From fc611ccd003d8f3e4c8d0e75a62966acb6305de0 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 25 Jun 2008 07:18:36 +0000 Subject: [PATCH] Remove the BlockerDB._blocker_cache attribute and just create new instances on demand instead of taking space on the heap. svn path=/main/trunk/; revision=10777 --- pym/_emerge/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 9d0ca28f4..f267c5422 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1682,15 +1682,14 @@ class BlockerDB(object): self._root_config = root_config self._vartree = root_config.trees["vartree"] self._portdb = root_config.trees["porttree"].dbapi - self._blocker_cache = \ - BlockerCache(self._vartree.root, self._vartree.dbapi) + self._dep_check_trees = { self._vartree.root : { "porttree" : self._vartree, "vartree" : self._vartree, }} def findInstalledBlockers(self, new_pkg, acquire_lock=0): - blocker_cache = self._blocker_cache + blocker_cache = BlockerCache(self._vartree.root, self._vartree.dbapi) dep_keys = ["DEPEND", "RDEPEND", "PDEPEND"] dep_check_trees = self._dep_check_trees settings = self._vartree.settings @@ -1739,7 +1738,7 @@ class BlockerDB(object): blocker_parents = digraph() blocker_atoms = [] for pkg in installed_pkgs: - for blocker_atom in self._blocker_cache[pkg.cpv].atoms: + for blocker_atom in blocker_cache[pkg.cpv].atoms: blocker_atom = blocker_atom[1:] blocker_atoms.append(blocker_atom) blocker_parents.add(blocker_atom, pkg) -- 2.26.2