diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-16 07:25:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-17 14:09:37 +0100 |
commit | f682b8b83d21d576160bac8dc57c4c989b4dc555 (patch) | |
tree | edb36ddf50062524367c25079361a53bb4c66976 | |
parent | c630d564285f55f9db10c18269bd310df797430e (diff) | |
download | bitbake-f682b8b83d21d576160bac8dc57c4c989b4dc555.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/data_smart.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 9be5d5e27..a6a4b6c8a 100644 --- a/lib/bb/data_smart.py +++ b/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) |