Comment 7 for bug 1003466

Revision history for this message
Michael Vogt (mvo) wrote :

Looking at the pmap out it looks like it the heap growing quite a bit. Probably releated to cache/db reopen.

However python-apt itself seems to be fine, the following:
from gi.repository import GObject

class GtkMainIterationProgress(apt.progress.base.OpProgress):
    """Progress that just runs the main loop"""
    def update(self, percent=0):
        context = GObject.main_context_default()
        while context.pending():
            context.iteration()

cache=apt.Cache()
while True:
 cache.open(GtkMainIterationProgress()

shows stable memory behavior. The following fragment:
import sys
sys.path.insert(0, "/usr/share/software-center")

from softwarecenter.db.pkginfo import get_pkg_info
from softwarecenter.db.database import StoreDatabase

cache = get_pkg_info()
cache.open()
db = StoreDatabase(cache=cache)
db.open()
while True:
    db.reopen()

does so too. So we need some further digging, its more than just the cache/db reopen on install/remove.