[Yum-devel] [PATCH] speed up yum dependency resolving

Gijs Hollestelle g.hollestelle at gmail.com
Sun Jan 16 18:30:29 UTC 2005


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.

Regards,
  Gijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: namearch.patch
Type: text/x-patch
Size: 1032 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20050116/20a0da44/attachment.bin 


More information about the Yum-devel mailing list