why doesn't yum cache anything?

Daniel Veillard veillard at redhat.com
Fri Dec 31 09:36:45 UTC 2004


On Thu, Dec 30, 2004 at 10:50:26PM -0800, Jamie Zawinski wrote:
> Sean Middleditch wrote:
> > 
> > The problem you're perceiving (slow operation as yum starts up) isn't at
> > all due to lack of caching, but perhaps very inefficient handling of the
> > cache - a lot of data has to be parsed and such, when it could perhaps
> > be stored in a more ready-to-process format.
> 
> It takes *nearly a minute* to do that!  I'm on a 2GHz machine.
> If it's not hitting the net, what's it doing, raytracing?

  Parsing the XML file and building the associated Python objects.

And before bashing XML and the cost of parsing, it's only a very small
fraction of the time spent, building the Python strings and objects is
the really costly part as we found with seth when doing basic tests.
My own test led me to believe that python string interning (take a 
string from the C layer or XML and get the copy from Python own string
implementation) is extremely costly, and of course we are manipulating
an very large amount of strings when collecting the repodata.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




More information about the devel mailing list