summaryrefslogtreecommitdiffstats
path: root/pym/_emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-04 20:14:17 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-04 20:14:17 -0700
commit49f405428fe1d86061c41aad16d5c413170b1ca6 (patch)
tree6703d3cdecfdf1457a351b294e6b80e3eed16a28 /pym/_emerge
parent54f830de2eb4da60075c72169677773a355115bf (diff)
downloadportage-49f405428fe1d86061c41aad16d5c413170b1ca6.tar.gz
portage-49f405428fe1d86061c41aad16d5c413170b1ca6.tar.bz2
portage-49f405428fe1d86061c41aad16d5c413170b1ca6.zip
Optimize depgraph/portdbapi cache handling.
Diffstat (limited to 'pym/_emerge')
-rw-r--r--pym/_emerge/depgraph.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 3b0fdbec9..ac23f4ba0 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2468,7 +2468,14 @@ class depgraph(object):
db = root_config.trees[self.pkg_tree_map[pkg_type]].dbapi
if hasattr(db, "xmatch"):
- cpv_list = db.xmatch("match-all", atom)
+ # For portdbapi we match only against the cpv, in order
+ # to bypass unecessary cache access for things like IUSE
+ # and SLOT. Later, we cache the metadata in a Package
+ # instance, and use that for further matching. This
+ # optimization is especially relevant since
+ # pordbapi.aux_get() does not cache calls that have
+ # myrepo or mytree arguments.
+ cpv_list = db.xmatch("match-all-cpv-only", atom)
else:
cpv_list = db.match(atom)