Optimize repoman to share portdbapi.cp_list() results
authorZac Medico <zmedico@gentoo.org>
Fri, 2 Nov 2007 06:25:08 +0000 (06:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 2 Nov 2007 06:25:08 +0000 (06:25 -0000)
between all profiles since those results never change.
The cached results also propagate to the xmatch
match-all when appropriate (old-style virtuals are
excluded since they are profile dependent).
(trunk r8313)

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

bin/repoman

index 9579903c58252b8d6c428aff0110794324d70300..499e4f720339849429cd2451075caf3b3a314706 100755 (executable)
@@ -889,6 +889,8 @@ if isCvs:
 dofail = 0
 arch_caches={}
 arch_xmatch_caches = {}
+shared_xmatch_caches = {"cp-list":{}}
+
 for x in scanlist:
        #ebuilds and digests added to cvs respectively.
        if verbose:
@@ -1567,6 +1569,7 @@ for x in scanlist:
                                        portdb.melt()
                                        portdb.freeze()
                                        xcache = portdb.xcache
+                                       xcache.update(shared_xmatch_caches)
                                        arch_xmatch_caches[xmatch_cache_key] = xcache
 
                                trees["/"]["porttree"].settings = dep_settings