[Yum-devel] fun little performance problem

seth vidal skvidal at phy.duke.edu
Wed Mar 16 23:01:49 UTC 2005


On Wed, 2005-03-16 at 17:37 -0500, seth vidal wrote:
> On Wed, 2005-03-16 at 16:27 -0500, seth vidal wrote:
> > Try out repoclosure.py with the sqlite backend and compare it to the
> > non-sqlite metadata.
> > 
> > tell me if you notice anything? :)
> > 
> > the sqlite searchPrco() method is significantly slower than the pickle-
> > cache one. I'm going to take a few looks and see if there is an obvious
> > way to speed this up. other suggestions welcome :)
> > 
> 
> I'm wrong, it's not searchPrco() it looks like it is in getPrco where
> things slow down a bit.
> 
> ideas on why we're querying ALL The prco information for each request.
> Why not getPrco(self, pkgId, prcotype)?
> 

I made this change - the performance difference exists but is not hugely
noticeable. I modified getPrco() and returnPrco() so that we need not
modify other code. I've not checked these changes in yet b/c I'm curious
about other ways to make this lookup faster. 

If we were to add an index on requiresname as well as providesname we
might see some speed up. As it stands I'm not sure we will. 

I made another change I've not yet checked in:
 I modified the __init__ for the RepoStorage class in repos.py so that
an external programmer could set self.sqlite = False then call
self._selectSackType() and set the sacktype.

So, if someone wants to eat memory but make the lookups VERY fast, they
can, does that seem reasonable? This isn't really exposed anywhere but I
guess it is what Gijs was talking about  a while ago wrt to letting
sqlite be selectable.

thoughts?

-sv






More information about the Yum-devel mailing list