[Rpm-maint] Patch: faster dependency solving

Michael Schroeder mls at suse.de
Wed Aug 6 12:01:01 UTC 2014


Hi Panu et al,

attached are two patches to make dependency solving faster/more correct.
The first one switches the "installed file conflicts" cache from
complete file names to base names, to make fingerprinting work for them.

The second one is the more interesing one, it adds a "installed file
requires" cache. This cache is only created at the start of 
rpmtsCheck(), so it is most useful for big transactions. It is used
to prune the filelist of the erased packages.

Some numbers from my system:

$ rpm -ql ddd | wc -l
51
$ rpm -ql kernel-source | wc -l
31128

With cold caches:
  - erase ddd
    complete dependency check: 27ms
  - erase ddd with requires cache
    cache creation: 16ms, complete dependency check: 30ms

  - erase kernel-source
    complete dependency check: 72ms
  - erase kernel-source with requires cache
    cache creation: 16ms, complete dependency check: 33ms

With hot caches:
  - erase ddd
    complete dependency check: 0ms
  - erase ddd with requires cache
    cache creation: 2ms, complete dependency check: 2ms

  - erase kernel-source
    complete dependency check: 44ms
  - erase kernel-source with requires cache
    cache creation: 2ms, complete dependency check: 8ms

So it's a very little bit slower for small packages, but helps a
lot for big packages or big transactions.

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH,  GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Put-basenames-in-the-conflict-dependency-cache.patch
Type: text/x-patch
Size: 1856 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20140806/9a2bec48/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Also-build-cache-file-requires-of-installed-packages.patch
Type: text/x-patch
Size: 2738 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20140806/9a2bec48/attachment-0001.bin>


More information about the Rpm-maint mailing list