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>
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)