For repoman, only cache the metadata necessary for visibility
authorZac Medico <zmedico@gentoo.org>
Tue, 8 Apr 2008 05:42:01 +0000 (05:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 8 Apr 2008 05:42:01 +0000 (05:42 -0000)
checks in order to reduce memory consumption. (trunk r9743)

svn path=/main/branches/2.1.2/; revision=9753

bin/repoman

index 70c1fad8da62b86ae5d59edf13eca5f04c82d84f..5720bf112d91271e969ac7a5ecd5da485dd4819b 100755 (executable)
@@ -694,6 +694,11 @@ trees = portage.create_trees()
 trees["/"]["porttree"].settings = repoman_settings
 portdb = trees["/"]["porttree"].dbapi
 portdb.mysettings = repoman_settings
+# We really only need to cache the metadata that's necessary for visibility
+# filtering. Anything else can be discarded to reduce memory consumption.
+for k in ("DEPEND", "IUSE", "LICENCE", "PDEPEND",
+       "PROVIDE", "RDEPEND", "RESTRICT", "repository"):
+       portdb._aux_cache_keys.discard(k)
 # dep_zapdeps looks at the vardbapi, but it shouldn't for repoman.
 del trees["/"]["vartree"]