[Yum-devel] [PATCH] Lazy sqlite retrieval

Jeremy Katz katzj at redhat.com
Mon Aug 21 23:31:34 UTC 2006


I was looking at the hotshot output from pirut for "list all packages"
and noticed that YumAvailablePackageSqlite.returnSimple() was taking up
a significant chunk of the time.  We seem to be getting a lot more data
there than we really needed --
  * We queried for basically everything and then did the db2class
conversion rather than just getting things we really care aout
  * We did the query against all of the sqlite databases instead of just
the one that the package is in

The attached changes things so that we only query against the "correct"
database and is a little bit smarter with returnSimple() only looking
for what we want

Comments?

Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-sqlite-opt.patch
Type: text/x-patch
Size: 7816 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20060821/ea57084c/attachment.bin 


More information about the Yum-devel mailing list