summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-16 07:25:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-17 14:11:03 +0100
commitf78db82e1aed5d8eefe03c57eb96fd14b44f52b7 (patch)
tree1fb7617e5e0c5c7cb910789982fd8a5a97b13c41 /bitbake/lib/bb/data_smart.py
parent43f1867e32b502744fcb4b80549f0e6b43878191 (diff)
downloadpoky-f78db82e1aed5d8eefe03c57eb96fd14b44f52b7.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r--bitbake/lib/bb/data_smart.py5
1 files changed, 5 insertions, 0 deletions
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:
94 if self.varname and key: 94 if self.varname and key:
95 if self.varname == key: 95 if self.varname == key:
96 raise Exception("variable %s references itself!" % self.varname) 96 raise Exception("variable %s references itself!" % self.varname)
97 if key in self.d.expand_cache:
98 varparse = self.d.expand_cache[key]
99 self.references |= varparse.references
100 self.execs |= varparse.execs
101 return varparse.value
97 var = self.d.getVar(key, True) 102 var = self.d.getVar(key, True)
98 if var is not None: 103 if var is not None:
99 self.references.add(key) 104 self.references.add(key)