Description of problem: The auto-update-debuginfo plugin's postreposetup_hook calls doRepoSetup once after enabling each debuginfo repo. This is inefficient because doRepoSetup calls all of the postreposetup hooks every time (including a reentrant call to the auto-update-debuginfo plugin, which fortunately does nothing because of the _done_plugin flag). The design also feels wrong. I have no prior experience hacking on yum, but I changed the auto-update-debuginfo hook to a prereposetup hook and removed the doRepoSetup call, and yum appeared to work correctly (and faster), including with --enablerepo or --disablerepo on the command line (bug 516254). Version-Release number of selected component (if applicable): yum-utils-1.1.26-1.fc12.noarch How reproducible: Always Steps to Reproduce: 1. Make sure at least one debuginfo package is installed. Also install the fastestmirror plugin. 2. yum list yum-utils Actual results: Other plugins' postreposetup hooks run many times. (See output to be attached.) Expected results: Those hooks run only once. (See output to be attached.)
Created attachment 405194 [details] Current yum output
Created attachment 405196 [details] Yum output with my patch
Created attachment 405197 [details] Patch that I am using This patch changes the hook to a prereposetup hook and makes some other cleanups.
What's the "time yum repolist" and/or "time yum list yum" in both cases?
The timings are at the end of each log. But this is a design improvement regardless of the amount of speedup.
Created attachment 406963 [details] Analogous patch for debuginfo-install debuginfo-install could benefit from the same change. The time saved is again about 3 seconds on my system. Here is a patch that makes the change and also tweaks the logic to exactly match the auto-update-debuginfo plugin (namely, to not bother to re-enable already enabled repos).
Thanks for the patches, both are upstream now (although they needed a bit of tweaking due to changes ... feel free to test them!:)
yum-utils-1.1.27-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/yum-utils-1.1.27-1.fc13
yum-utils-1.1.27-2.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update yum-utils'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/yum-utils-1.1.27-2.fc13
yum-utils-1.1.27-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.