Bug 246678 - conduit.delPackage() extremely slow with newer yum
Summary: conduit.delPackage() extremely slow with newer yum
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum   
(Show other bugs)
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-03 21:34 UTC by Stéphane Lesimple
Modified: 2014-01-21 22:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-03 20:39:20 UTC
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 21:34 UTC, Stéphane Lesimple
no flags Details | Diff

Description Stéphane Lesimple 2007-07-03 21:34:53 UTC
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 21:34:53 UTC
Created attachment 158479 [details]
Dirty and temporary workaround

Comment 2 Seth Vidal 2007-08-03 20:39:20 UTC
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.