Hey,
 I was putting together a plugin[1] for something jesse did when I
noticed that the particular plugin was taking MINUTES to run. And
considering how little the plugin does - that seemed silly.

so after a little bit of notice - I looked at plugins.py

in the delPackage() method in MainPluginConduit. It calls:
        self._base.pkgSack.delPackage(po)

b/c of all the functions we end up calling when we call delPackage() on
the MetaSack  it takes very long (1-2 seconds per package)

the way around this is to call the delPackage() routine per-sack,
alternatively to call it like this:

po.repo.sack.delPackage(po) (yes, that looks as silly to me, too)

but it gets WAY faster when you do it that way. Anyway there are a
couple of things we can do to fix this:

1. patch plugins.py to call the above when 'delPackage() is called. -
this is easy, it doesn't break api and it kinda makes sense
2. add a method exclude() to YumAvailablePackage that will call
self.repo.sack.delPackage(self) on itself. This seems like a good thing
for later anyway - but we can't expect things to use this method right
now.
3. patch all the plugins to step around this manually (ick)

Anyone have a preference?

I personally like 1 & 2.

Alternatively, if there is something I've missed on why
pkgSack.delPackage() takes so long - let me know.

I know that it takes a looooooooong time and that's why I stepped around
it in excludePackages()

-sv


_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to