Conversation
|
@deivid-rodriguez here's a small change for a pretty decent performance improvement. I tried memoizing more things in rubygems but decided not to since I'm unsure how useful it'd be. |
deivid-rodriguez
left a comment
There was a problem hiding this comment.
This looks very good, thanks for this. A 30% improvement for a one line change feels pretty great.
Do any of the other changes have any effect at all on your application? I'm asking because it might be best to just change "the money maker" here. Other changes involve vendored code from Molinillo and code monkey patched from RubyGems, so we probably should not change those without changing the upstream too. Also, I'm not sure changing sources has any effect given that the source list is usually short and sources are not compared often.
|
I tried this patch on |
|
Yeah, I got a little carried away. Happy to just memorize the lazy spec only. It’s late for me so I won’t be able to get to it until tomorrow. Feel free to modify this pr and land! It’s a very simple change. Otherwise I can get to it tomorrow. |
|
Closing this out in favor of #5533 |
|
Thank you so much for your investigation and patch, by the way!! ❤️ I obviously credited you on #5533 since I wouldn't have found the culprit without this hint! |
|
No problem. @technicalpickles and I will find some more time and more hints for you 😄 There’s actually a problem with the latest released version though so we haven’t been able to upgrade. We’re unable to do a bundle install from scratch. I’ll take a closer look today to see if it’s something on our end or it’s because of the last speed up changes. |
|
Ouch, yeah, let me know what you find! :) |
@deivid-rodriguez I started an issue: #5538 |
What was the end-user or developer problem that led to this PR?
require 'bundler/setupis slow for large Gemfiles (eg 500+ gems)What is your fix for the problem, implemented in this PR?
Memoize some
#hashimplementations since they don't change and we do it a lot for large gem files.Before
After
About 30% less time.
Make sure the following tasks are checked