From f78db82e1aed5d8eefe03c57eb96fd14b44f52b7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 16 Sep 2013 07:25:08 +0000 Subject: bitbake: data_smart: use the expand_cache in VariableParse When in VariableParse, use the expand_cache if possible rather than looking up data. Ultimately it would come from the same place but this short cuts a heavily used code block for speed improvements. (Bitbake rev: f682b8b83d21d576160bac8dc57c4c989b4dc555) Signed-off-by: Richard Purdie --- bitbake/lib/bb/data_smart.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bitbake') diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 9be5d5e270..a6a4b6c8ae 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py @@ -94,6 +94,11 @@ class VariableParse: if self.varname and key: if self.varname == key: raise Exception("variable %s references itself!" % self.varname) + if key in self.d.expand_cache: + varparse = self.d.expand_cache[key] + self.references |= varparse.references + self.execs |= varparse.execs + return varparse.value var = self.d.getVar(key, True) if var is not None: self.references.add(key) -- cgit v1.2.3-54-g00ecf