[Yum-devel] [RFC] TransactionInfo vs DepCheck

Jeremy Katz katzj at redhat.com
Mon Aug 6 20:16:50 UTC 2007


On Mon, 2007-08-06 at 13:52 +0200, Florian Festi wrote:
> I've done some profiling runs to find quadratic behavior / places for 
> further optimization. It turned out that TransactionData (Why doesn't the 
> class name match the module name, btw?) .matchNaevr() uses up 25% of the 
> time of the "install [a-k]*" test case (large transaction with lots of 
> depsolving).
> I'd suggest to reorganize .pkgdict to {name -> [txmbrs]} and rename it to 
> ._pkgdict. This would make getting the txmbr of the given package slightly 
> more expensive but lets us getting rid of the linear runtime of .matchNaevr().

Hrmm... could we keep .pkgdict and then add the new dict?  Would be
slightly more expensive in terms of memory, but would keep
compatibility.  I know that at least anaconda will need changes
otherwise.  Or maybe we can do something "clever" like make self.pkgdict
into an object that's accessible as a dictionary returning as it always
has but with the faster access also?

Jeremy




More information about the Yum-devel mailing list