Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many allocations when using Bullet >= 7.0.5 #647

Open
aglushkov opened this issue Feb 10, 2023 · 0 comments
Open

Too many allocations when using Bullet >= 7.0.5 #647

aglushkov opened this issue Feb 10, 2023 · 0 comments

Comments

@aglushkov
Copy link

aglushkov commented Feb 10, 2023

We've seen large RPS degradation on staging server where we have bullet enabled

Looks like bullet allocates more objects than the rest of application

It looks CallStack is one to blame, it appears in Bullet 7.0.5

This report was generated with allocation_stats gem

<GEM:bullet-7.0.7>/lib/bullet/detector/n_plus_one_query.rb                          String       664
<GEM:activerecord-7.0.4.2>/lib/active_record/.../postgresql/database_statements.rb  String       699
<GEM:bullet-7.0.7>/lib/bullet/ext/string.rb                                         MatchData    706
<GEM:stringex-2.8.5>/lib/stringex/localization/default_conversions.rb               String       832
<GEM:stringex-2.8.5>/lib/stringex/localization.rb                                   Hash         832
<GEM:stringex-2.8.5>/lib/stringex/localization.rb                                   String       832
<GEM:stringex-2.8.5>/lib/stringex/unidecoder.rb                                     String       878
<PWD>/app/services/utils/params/parse_fields.rb                                     String       905
<GEM:activesupport-7.0.4.2>/lib/active_support/core_ext/object/json.rb              String       954
<GEM:activesupport-7.0.4.2>/lib/active_support/json/encoding.rb                     String       994
<GEM:activerecord-7.0.4.2>/lib/active_record/reflection.rb                          String       996
<GEM:activesupport-7.0.4.2>/lib/active_support/core_ext/object/json.rb              Hash        1077
<GEM:activerecord-7.0.4.2>/lib/active_record/reflection.rb                          Array       1850
<GEM:bullet-7.0.7>/lib/bullet/ext/string.rb                                         String      1860
<GEM:bullet-7.0.7>/lib/bullet/ext/object.rb                                         String      2381
<GEM:bullet-7.0.7>/lib/bullet/registry/call_stack.rb                                String     31799
---------------------------------------------------------------------------------  ---------  -----
                             sourcefile                                             class    count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant