summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-04-15 15:27:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-15 15:57:31 +0100
commit9bbf6f350d84900cd2852bb321edf9b7dbcdc642 (patch)
tree1f0bdf0c5fdca5744fcb040bdae12e9eedd8d359 /bitbake
parent07e83d04ace1b78df656c8c32fc336302adae097 (diff)
downloadast2050-yocto-poky-9bbf6f350d84900cd2852bb321edf9b7dbcdc642.zip
ast2050-yocto-poky-9bbf6f350d84900cd2852bb321edf9b7dbcdc642.tar.gz
bitbake: data: fix performance regression
BitBake commit 7c568132c54a21161de28907159f902462f1e2bb resulted in a fairly serious performance regression during parsing, almost doubling the time taken to do a full parse and almost certainly impacting performance during building. The expandKeys function is called frequently, and if we avoid using keys() and instead just use the normal variable lookup mechanism, performance is restored. (Bitbake rev: 034b392e9877309f15940b258fc2c16f16fb40b5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/data.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 110666c..abf210a 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -158,9 +158,9 @@ def expandKeys(alterdata, readdata = None):
for key in todolist:
ekey = todolist[key]
- if ekey in keys(alterdata):
+ newval = alterdata.getVar(ekey, 0)
+ if newval:
val = alterdata.getVar(key, 0)
- newval = alterdata.getVar(ekey, 0)
if val is not None and newval is not None:
bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval))
alterdata.renameVar(key, ekey)
OpenPOWER on IntegriCloud