Red Hat Bugzilla – Bug 451083
pkgorder speed improvement
Last modified: 2013-07-04 08:46:45 EDT
In pkgorder, the printMatchingPkgs method calls glob.glob many times. This call
is a bit slow and, since the directory content shouldn't be changing, isn't
necessary. I'll attach a patch that speeds up the script by a factor of 4x.
Created attachment 309118 [details]
remove repeated glob.glob calls
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Removed the glob.glob calls from printMatchingPkgs() function.
Now the script builds the package list just once outside of the function, and then uses fnmatch in the function to print the matching packages.
Tested on a custom repo, and it gives the same results as the original script, in 1/2 the time.
Will be available in version 126.96.36.199.
on the same package set using pkgorder from 5.3.
can we move this one to verified ?
can you provide some data from pkgorder execution? My test in comment #6 doesn't show big difference so I'm not sure if we want to move this to VERIFIED.
For the 5.4 ppc Server tree with 5.4 anaconda, I get:
For the same tree with the 5.3 anaconda, I get:
So, I'm seeing about a 25% improvement. I think we can close this bz and open a new one if we want to make other performance improvements.
Moving to VERIFIED as per comment #8
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.