[RFC] rpmUtils.updates with package objects (Was: Re: [Yum-devel] beyond 3.0.X)
James Bowes
jbowes at redhat.com
Sun Dec 10 00:59:14 UTC 2006
Hi:
seth vidal wrote:
> rpmUtils.updates could possible be converted over to pkg objects and/or
> that whole piece of code be brought into the yum module hierarchy and
> cleaned up. I understand why it was originally in rpmUtils, that was
> when I had some delusion that other tools would use rpmUtils but not the
> yum modules. As it seems now no one uses the rpmUtils unless they're
> using yum so there's no eventual reason why we shouldn't trundle pieces
> over to yum as a migration/update path w/o breaking the older mechanism
> simply by letting it sit.
Attached is a first cut at replacing package tuples with objects in
rpmUtils.updates. This patch breaks the API in ways that will make
Jeremy cry, so the next step is to probably make a new file in yum/ for
this new updates code, and leave the rpmUtils one alone. Also, to make
new methods on the sack objects, instead of modifying the existing ones.
After that, this code is really slow. For example running
'PYTHONPATH=. time python yummain.py -C list updates'
with one update available is about three seconds slower with the new
code than the old code.
From what I see, the main performance hits come from running sql
queries, reading values from the resultsets, and making package objects
from the results.
You may notice that I've added a mechanism to track packages already
loaded from the db to sqlitesack. This caching took about a second off
of the previously mentioned test, so hopefully adding it to more method
calls will help.
-James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: po-rpmu-updates.patch
Type: text/x-patch
Size: 37048 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20061209/7d1b2353/attachment.bin
More information about the Yum-devel
mailing list