[Yum-devel] [PATCH] Lazy sqlite retrieval
seth vidal
skvidal at linux.duke.edu
Mon Aug 21 23:37:27 UTC 2006
On Mon, 2006-08-21 at 19:31 -0400, Jeremy Katz wrote:
> 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?
The gist of what you're trying to do makes sense to me - and menno
mentioned something related (about moving parsePackages into the
packagesacks) this morning.
It would mean less functions doing:
"give me all the packages"
"I'll sort the packages to get the ones I want"
"I'll return the packages I want"
and more of:
"give me the packages I want"
My only question is this - do you want to check this in for 2.9.5 (which
is happening in about 20 minutes) or do you want to wait and break it a
bit before 2.9.6?
-sv
More information about the Yum-devel
mailing list