Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

ActiveRecord model objects may be getting shaped too large

Aberta
#9,583 2 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
30/100
Tipo de issue
Bug
Clareza
Precisa de esclarecimento
Status de atividade
Pouca atividade
Stack de tecnologia
java, ruby
Domínio
backend, performance

Direção de pesquisa

Start by reproducing the reported object shape for the Post model and compare its allocated size with its actual fields. Investigate whether ActiveRecord superclass method data influences the shape decision; the issue names no files or tests, so first locate the relevant allocation and shape-selection code. Done means confirming whether models are incorrectly allocated as RubyObject50 and identifying the cause.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

While investigating #9525 I noticed that the Post model object ends up using an enormous object shape: RubyObject50, certainly more than the actual fields in a model object. The shape decisions may be getting polluted by other method data from the ActiveRecord superclasses, resulting in a bad initial decision for the object size.

This needs to be investigated; if we are allocating 50-wide objects for all ActiveRecord models, we are consuming far too much memory and spending too much time on object initialization at the JVM level.

Linguagem predominante
Ruby
Estrelas
3.9k
Forks
951
Merge médio
2d 21h
PRs com merge (30d)
75

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de jruby/jruby

Todas as issues de jruby/jruby

Issues semelhantes

Mais issues de Ruby

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.