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:40 +0100
commitef73f099ff454045eb7a8d1f7119c78842c9f040 (patch)
treea22cb7751c1e08d55f2ba71b8e95336cea9e093e /bitbake
parent104aa2a01f608db769caa333ad93777ab8fbe56a (diff)
downloadpoky-ef73f099ff454045eb7a8d1f7119c78842c9f040.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)