From 49f405428fe1d86061c41aad16d5c413170b1ca6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 4 Oct 2010 20:14:17 -0700 Subject: Optimize depgraph/portdbapi cache handling. --- pym/_emerge/depgraph.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pym/_emerge') 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) -- cgit v1.2.3-1-g7c22