summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-04-15 14:16:28 +0200
committerJulian Andres Klode <jak@debian.org>2009-04-15 14:16:28 +0200
commit2b867aebe32d59b7450f3a7fb22390e0dd9f8cc7 (patch)
tree49d4d5ec7e109dfe55d51ffd2061c96ec18bd5da /debian
parent3caa05aa8e295d338be4bfbe7fdd2e825a59d947 (diff)
downloadpython-apt-2b867aebe32d59b7450f3a7fb22390e0dd9f8cc7.tar.gz
* apt/cache.py: Use set() and WeakValueDictionary() for holding packages.
Only create Package objects when they are requested, do not keep them in a dict. Saves 10MB for 25,000 packages on my machine. The set holds the names of all packages which have at least one version, and the WeakValueDictionary() holds weak references to created Package objects. This way accessing the same package two times should return the same object, kept by the WeakValueDictionary().
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog4
1 files changed, 3 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 261ff7bd..6cbdaac7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,8 +5,10 @@ python-apt (0.7.11) UNRELEASED; urgency=low
* Replace support for file objects with a more generic support for any object
providing a fileno() method and for file descriptors (integers).
* Add support for the Breaks fields
+ * Only create Package objects when they are requested, do not keep them in
+ a dict. Saves 10MB for 25,000 packages on my machine.
- -- Julian Andres Klode <jak@debian.org> Mon, 13 Apr 2009 18:08:10 +0200
+ -- Julian Andres Klode <jak@debian.org> Wed, 15 Apr 2009 13:47:42 +0200
python-apt (0.7.10.3) unstable; urgency=low