Skip to content
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
wants to merge 1 commit into from

Conversation

dekellum
Copy link
Contributor

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?

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.
@indirect
Copy link
Member

This seems like a good idea to me. I'm wary of potentially introducing issues late in the 1.1 release cycle, but hopeful that we can squeeze this in to the next RC.

@sunaku
Copy link
Contributor

sunaku commented Jan 20, 2012

+1

@dekellum
Copy link
Contributor Author

Fair enough regarding 1.1 release cycle. Would master be the next development branch? Would it be reasonable to merge and vet this change there?

@indirect
Copy link
Member

I've merged this to master as 051c7a921de855139b3779cec1e5fdb7542b417c. Thanks for the patch!

@indirect indirect closed this Jan 21, 2012
@dekellum
Copy link
Contributor Author

@indirect Thanks! When you going to push this commit?

@dekellum
Copy link
Contributor Author

Hey @indirect, sorry to be a bother, but did this merge commit get lost in the shuffle?

@indirect
Copy link
Member

Oops! Not sure how I missed pushing before. Thanks for reminding me about this. I've pushed your patch to the tip of master now, as 3d4163a.

@dekellum
Copy link
Contributor Author

And reverted in 6b45e28. *sigh* Will try to bring it back.

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

Successfully merging this pull request may close these issues.

None yet

3 participants