next_rails
next_rails copied to clipboard
[BUG] Bundle report compatibility takes a long time to find incompatible gems
Expected Behavior
When I run: be bundle_report compatibility --rails-version=8.0.1
I expect it to return within a reasonable time and not consume a large amount of memory.
Actual Behavior
When I run: be bundle_report compatibility --rails-version=8.0.1
It takes more than 40 seconds to find incompatible gems
Using stack prof I can also see it allocated a very large amount of object.
Possible Fix
Use fetcher instead of new when we use Gem::SpecFetcher
To Reproduce
- Find a relatively old project Rails version older than 6
- Run
bundle_report compatibility --rails-version=8.0.1 - Notice how much time it take to respond
Additional Information
I will abide by the code of conduct