next_rails icon indicating copy to clipboard operation
next_rails copied to clipboard

[BUG] Bundle report compatibility takes a long time to find incompatible gems

Open fbuys opened this issue 7 months ago • 0 comments

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.

Image

Possible Fix

Use fetcher instead of new when we use Gem::SpecFetcher

To Reproduce

  1. Find a relatively old project Rails version older than 6
  2. Run bundle_report compatibility --rails-version=8.0.1
  3. Notice how much time it take to respond

Additional Information

I will abide by the code of conduct

fbuys avatar Apr 10 '25 19:04 fbuys