Skip to content

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

@fbuys

Description

@fbuys

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions