Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Make fetch_specs faster #1294

Merged
merged 1 commit into from
Aug 9, 2011
Merged

Conversation

zeha
Copy link
Contributor

@zeha zeha commented Jul 8, 2011

fetch_specs merges installed, cached and remote_specs together, using Index.use.
Index.use has acceptable performance for small indexes, but when adding a large Index as generated by remote_specs, it takes ages.

This change reorders fetch_specs to base it's index off of the index generated by remote_specs and then replaces dupes with what cached_specs and installed_specs come up with.

Measured timing approximates, with this test program: https://gist.github.com/1067157

MRI 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]

1-0-stable       17sec
+ this            9sec
+ this + #1288    9sec

MRI 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

1-0-stable       11sec
+ this            6sec
+ this + #1288    4sec

indirect added a commit that referenced this pull request Aug 9, 2011
---
Make fetch_specs faster

fetch_specs merges installed, cached and remote_specs together, using Index.use.
Index.use has acceptable performance for small indexes, but when adding a large Index as generated by remote_specs, it takes ages.

This change reorders fetch_specs to base its index off of the index generated by remote_specs and then replaces dupes with what cached_specs and installed_specs come up with.

Measured timing approximates, with this test program: https://gist.github.com/1067157

MRI 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]

    1-0-stable       17sec
    + this            9sec
    + this + #1288    9sec

MRI 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

    1-0-stable       11sec
    + this            6sec
    + this + #1288    4sec
@indirect indirect merged commit 344467a into rubygems:1-0-stable Aug 9, 2011
@zeha zeha deleted the perf-idxuse branch March 8, 2024 07:10
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.

2 participants