This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
Add simple cache to Bundler.load_gemspec #1635
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In some projects, for example those with 10s of local gemspecs, use of
git ls-files
for spec.files, or specs requiring significant source to get at a spec.version; this change to cache load_gemspec results in notable performance gains.The cache also avoids loading these same gemspecs repeatedly with different LOAD_PATH values.
This came up originally in #1481 (\cc @sunaku, @tenderlove). Only a sub-case (specs from rubygems) of that original issue was dealt with before it was closed (#1567). There also, @indirect suggests "[caching] seems like a good plan eventually"
Perhaps this is actually easy enough, safe enough (I find no spec regressions) and suitable for 1.1?