[Yum-devel] [PATCH] speed up yum dependency resolving
seth vidal
skvidal at phy.duke.edu
Tue Jan 18 06:06:50 UTC 2005
On Sun, 2005-01-16 at 19:30 +0100, Gijs Hollestelle wrote:
> Hi all,
>
> Today I was testing somethings related to the sqlite patch I posted
> here earlier (new version of these patches coming soon). And I noticed
> that dependency resolving becomes really slow when there are a lot of
> packages. In my test I had the following repositories enabled:
>
> dag (1631) fedora-devel (3691) base (2622) newrpms (374) updates (506)
> and freshrpms (467) a total of 9291 packages.
>
> The reason dep solving becomes very slow is because for every
> dependency yum calls returnNewestByNameArch for one specific package
> name and arch, this is currently implemented as follows (in
> repomd/packageSack.py):
>
> Find the best version for all packages and all architectures and then
> filter out the requested info. My patch uses the index on name created
> by buildIndexes so that it only scans packages that have the correct
> name.
>
> This speeds up depsolving a lot, on my machine the depsolving for yum
> -d5 -C install xen went down from 17.5 to 8.5 seconds. (calculated by
> the timestamps outputted by -d5). When you don't have such a
> ridiculously large number of packages the effect may be less
> noticeable.
>
Somehow in my email reading I completely skipped this patch. Thanks - it
makes sense to only iterate over what you have to.
I'll apply it shortly.
thanks.
-sv
More information about the Yum-devel
mailing list