-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
PERF: avoid string allocations #17669
Conversation
|
its cutting down on a method invocation but this may be erased anyway, not sure, we can omit this |
@SamSaffron: I'm with @egilburg on this one, the PR doesn't make sense. |
a38bc4a
to
efcee36
Compare
efcee36
to
a668b09
Compare
@thedarkone @egilburg @sgrif the impact of this is actually quite stark:
(ran in RAILS_ENV=production) Before
After
Its a very noticeable chunk of memory being allocated. |
@SamSaffron you changed the PR and now always do The only new thing now is the Under which conditions do you get a |
You get it arel nodes and arel attributes when constructing complex queries, Post.count generates an Arel::Nodes:Count , and the includes thingy generates an Arel::Attributes::Attribute |
@SamSaffron ok now it makes sense, thanks! |
np, thanks for reviewing sometimes I get a bit carried away with On Thu, Nov 20, 2014 at 11:02 AM, Eugene Gilburg notifications@github.com
|
I still need to track down the source of the arel nodes coming through here, want to make sure there isn't a deeper problem. If there isn't this is |
OK, the revised a668b09 now makes sense. |
this makes sense to me 🚢 |
I am pretty sure this is correct, its also more explicit about the behavior here.