[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#578074: python-apt: apt.cache.Cache.get_changes could be faster



On Wed, Apr 21, 2010 at 08:30:29AM +0000, unknown wrote:
> Currently the get_changes call requires to create several thounsands high
> level apt.package.Package instances just to check which changes are
> marked.
OK, your patch reduced the time to 130 ms here. I rewrote it partially
and used a simple "not marked_keep(pkg)" to identify whether a package
has been changed. This reduces the time this method needs to about
17 ms. The patch landed in revision 400:
  http://bzr.debian.org/loggerhead/apt/python-apt/debian-sid/revision/400

Furthermore, req_reinstall_pkgs now requires 40 ms instead of 700 ms:
  http://bzr.debian.org/loggerhead/apt/python-apt/debian-sid/revision/403

And get_providing_packages() now takes 60 µs instead of 700 ms:
  http://bzr.debian.org/loggerhead/apt/python-apt/debian-sid/revision/404

I ran tests on all of them to verify that they behave exactly like
their old versions.

Have fun.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Attachment: pgpMP30pZT5O5.pgp
Description: PGP signature


Reply to: