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)
downloadpoky-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 110666ca2b..abf210aa6b 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -158,9 +158,9 @@ def expandKeys(alterdata, readdata = None):
158 158
159 for key in todolist: 159 for key in todolist:
160 ekey = todolist[key] 160 ekey = todolist[key]
161 if ekey in keys(alterdata): 161 newval = alterdata.getVar(ekey, 0)
162 if newval:
162 val = alterdata.getVar(key, 0) 163 val = alterdata.getVar(key, 0)
163 newval = alterdata.getVar(ekey, 0)
164 if val is not None and newval is not None: 164 if val is not None and newval is not None:
165 bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval)) 165 bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval))
166 alterdata.renameVar(key, ekey) 166 alterdata.renameVar(key, ekey)