why doesn't yum cache anything?

Gijs Hollestelle g.hollestelle at gmail.com
Mon Jan 3 08:40:49 UTC 2005


On Sun, 02 Jan 2005 15:42:16 -0800, Jamie Zawinski <jwz at jwz.org> wrote:
> Second: everyone keeps talking about dependency resolution and how
> that's bound to be slow, but as far as I can tell, there's no reason to
> resolve dependencies at all when I'm just doing "list".  So either
> there's dependency resolution going on when there shouldn't be, or it's
> not relevant at all.

You raise a very valid point here. Even if there is no dependency
resolving required yum parses all package headers (file lists,
requirements, obsoletes, etc) and builds the dependecny resolving
indexes which is not necessary at all.

I did a quick test yesterday, by changing the importFromDict, which
translates the loaded pickle cache into the internat data structures
used by yum, function so that it only reads nevra (name and version
information) and optionaly obsoletes information (in case a list
obsoletes is performed). These changes speeded up things considerably.
>From about 6 seconds to 4 seconds.

So it might be worth implementing a listonly flag to importFromDict
which is set when the user only requested a list action. This won't
speed up actual upgrades or installs, but will make things that users
expect to be fast (i.e. listing available packages or updates) faster.

Kind regards,
  Gijs Hollestelle




More information about the fedora-devel-list mailing list