Bug 662347 - dependency solving by file name is very slow
Summary: dependency solving by file name is very slow
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 19
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-12-11 21:51 UTC by John Reiser
Modified: 2015-02-17 13:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-17 13:32:03 UTC
Type: ---

Attachments (Terms of Use)

Description John Reiser 2010-12-11 21:51:35 UTC
Description of problem: Dependency solving for libguestfs slows pungi to a crawl when composing an install DVD from rawhide.  Dependencies of most other packages are resolved quickly, faster than the log can be displayed by gnome-terminal; but for libguestfs the dependencies are printed slowly enough to read.

libguestfs has about 190 dependencies; about 140 of them are file names (not package names).  Applying 'strace' shows that the ...-filelists.sqlite is searched linearly for each dependent file name.  If filelists.sqlite does not have an index which enables random access by file name, then dependency solving should build and cache a private temporary index (hash table, etc.) as it goes, in order to amortize the cost of linear search among successive searches.  For instance, see GNU 'make', which creates a private in-memory incremental hash table of file names by directory (while reading only as much as necessary from each directory.)

Version-Release number of selected component (if applicable):

How reproducible: every time

Steps to Reproduce:
1./usr/bin/pungi -c rawhide-fedora.ks --destdir=$DESTDIR --name Fedora --ver 15 --nosource
Actual results: Dependencies of libguestfs are resolved less than 2 per second.

Expected results: Dependencies of libguestfs are resolved at least 10 per second.

Additional info: rawhide-source/...-filelists.sqlite also is searched.  This seems strange because no source file can satisfy a [binary] dependency.

Comment 1 James Antill 2010-12-13 14:18:27 UTC
> libguestfs has about 190 dependencies; about 140 of them are file names (not
> package names).

 Why? You don't even need package names as they are all libraries like:


...at _best_ this will require the user having to download filelists.
 We know the filelists has a bad schema, and want to change the repodata ... but getting the time to do a change like that isn't easy (esp. now).

>  Applying 'strace' shows that the ...-filelists.sqlite is
> searched linearly for each dependent file name.  If filelists.sqlite does not
> have an index which enables random access by file name

 Yes, it does. Putting some debugging in there, though I see we were running some debug code for every file lookup ... which is fine normally (when we do a couple of file looksup total) as it only has an overhead of about 0.1 second, libguestfs isn't normal though.
 It's still not perfect, but for comparison:

  sudo repoquery --verbose --requires libguestfs --resolve  16.64s user 0.43s system 99% cpu 17.226 total

  sudo repoquery --verbose --requires libguestfs --resolve  4.42s user 0.18s system 99% cpu 4.629 total

...as a comparison, perl has ~194 requirements (although they mostly come from perl itself):

  sudo repoquery --verbose --requires perl --resolve  1.96s user 0.13s system 94% cpu 2.219 total

Comment 2 Fedora End Of Life 2013-04-03 19:04:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:

Comment 3 Fedora End Of Life 2015-01-09 16:28:45 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2015-02-17 13:32:03 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.