Skip to content
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

Avoid outdated definition checks when in frozen mode #4855

Closed
deivid-rodriguez opened this issue Aug 18, 2021 · 1 comment
Closed

Avoid outdated definition checks when in frozen mode #4855

deivid-rodriguez opened this issue Aug 18, 2021 · 1 comment

Comments

@deivid-rodriguez
Copy link
Member

deivid-rodriguez commented Aug 18, 2021

Some of the fixed work that needs to be done at bundler/setup time is to verify whether the lockfile is out of date with respect to the Gemfile, and in that case, trigger a resolution so that it becomes up to date.

However, this work can be skipped when in frozen mode, since we will use exclusively the information in the lockfile anyways.

We should lazily run all of this work which currently runs every time we instantiate a definition, so that it only runs when in non frozen mode, not every time.

That should considerably speed up bundler/setup time in frozen mode, and it would also give us an upper bound for the performance improvements that could be gained by implementing something like rubygems/bundler#6448 (store the Gemfile checksum in the lockfile, to potentially skip re-resolving if it doesn't match the one for the current Gemfile). That feature would need to be opt-in since it would only work for static Gemfiles, but it'd be nice to get the free gains in frozen mode first, to see how much of a performance improvement it would bring.

@deivid-rodriguez
Copy link
Member Author

I made some experiments with this until I realized that my idea is flawed. Frozen mode requires exactly the same outdated definition checks as normal mode. Only difference is that bundler will rise if those checks are not met instead of re-resolving. Closing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant