-
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: dedupe scanned route fragments #31999
Conversation
Per: https://bugs.ruby-lang.org/issues/13077 String @- will dedupe strings. This takes advantage of this by deduping route fragments that are full of duplication usually. For Discourse: Before: Total allocated: 207574305 bytes (2214916 objects) Total retained: 36470010 bytes (322194 objects) After Total allocated: 207556847 bytes (2214711 objects) Total retained: 36327973 bytes (318627 objects) <- object that GC can not collect So we save 3500 or so RVALUES this way, not the largest saving in the world, but worth it especially for large route files.
r? @eileencodes (@rails-bot has picked a reviewer for you, use r? to override) |
This PR broke a lot of tests. Reverting |
Sorry about that, will have a careful look and correct it.
…On Fri, Feb 16, 2018 at 7:43 AM, Rafael França ***@***.***> wrote:
This PR broke a lot of tests. Reverting
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31999 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAUXX9dNi59kwCGMSpog6_Ie4imFcE4ks5tVJbigaJpZM4SGUBN>
.
|
@rafaelfranca I fixed it in Confirmed tests are running in local, can you merge it in or do you want me to redo the PR? |
I can manually apply the two patches. Doing |
done! |
This reverts commit f282f37.
thanks heaps, and apologies!
…On Fri, Feb 16, 2018 at 9:35 AM, Rafael França ***@***.***> wrote:
done!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31999 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAUXZrbBx-Bs65npHGxGLBc37YJ26Wzks5tVLE1gaJpZM4SGUBN>
.
|
Since master is already 6.0, will we stop supporting for 2.2.x? |
Oh ... I think we should otherwise, just monkey patch in 2.2 is EOL in March 31, 2018, I would drop it for master. |
Per: https://bugs.ruby-lang.org/issues/13077 String @- will dedupe strings.
This takes advantage of this by deduping route fragments that are full of duplication usually.
For Discourse:
Before:
Total allocated: 207574305 bytes (2214916 objects)
Total retained: 36470010 bytes (322194 objects)
After
Total allocated: 207556847 bytes (2214711 objects)
Total retained: 36327973 bytes (318627 objects) <- object that GC can not collect
So we save 3500 or so RVALUEs this way, not the largest saving in the world, but worth it especially for large route files.