Bug 246678 - conduit.delPackage() extremely slow with newer yum
conduit.delPackage() extremely slow with newer yum
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-03 17:34 EDT by Stéphane Lesimple
Modified: 2014-01-21 17:58 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-03 16:39:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Dirty and temporary workaround (2.12 KB, patch)
2007-07-03 17:34 EDT, Stéphane Lesimple
no flags Details | Diff

  None (edit)
Description Stéphane Lesimple 2007-07-03 17:34:53 EDT
Description of problem:
The usage of the yum-priorities plugin (which extensively uses delPackage()) is
very difficult with the yum version bundled with Fedora 7. The issue doesn't
happen with the yum version included in Fedora Core 6.
I've added some python code in the plugin, to find that :
- Excluding ~3000 packages takes around 1 second with yum 3.0.6 (fc6)
- Excluding ~3000 packages takes more than 6 minutes with yum 3.2.0 (fc7). Same
issue with yum 3.2.1.

Version-Release number of selected component (if applicable):
yum-3.2.1-1.fc7

How reproducible:
Always

Steps to Reproduce:
1. Add a couple of repositories that have a lot of overlapping packages (i.e.
dries, rpmforge, rpmfarm, freshrpms)
2. Install the yum-priorities plugin
3. # time yum install NonExistentPackage
  
Actual results:
Takes long minutes

Expected results:
Should take a couple of seconds

Additional info:
The problem is due to the fact that YumSqlitePackageSack.delPackage() now sets
self.pkglist to None, forcing yum to rebuild the pkglist at _each_ call to
delPackage(). If you have 3000 packages to exclude, you rebuild the entire
pkglist 3000 times, even if you don't use it between the delPackage() calls.

External bug reference:
https://devel.linux.duke.edu/bugzilla/show_bug.cgi?id=756

About the attached patch:
This is not intended to be an out-of-the-box fix to the problem. Only a
workaround : it removes the offending line in delPackage() and delays the
pkglist rebuilding to right after the execution of the exclude_hook for the
plugins. The problem can probably be fixed in a more proper way.
Comment 1 Stéphane Lesimple 2007-07-03 17:34:53 EDT
Created attachment 158479 [details]
Dirty and temporary workaround
Comment 2 Seth Vidal 2007-08-03 16:39:20 EDT
This is fixed in upstream and will be in 3.2.3
thanks

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