summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2007-08-17 23:35:17 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2007-08-17 23:35:17 +0000
commit802d4389c560d1759e0fbed99515c50b868ed401 (patch)
treef8d9885df69d76c56f4e12df999857a6a693575e
parentb3b407dc9899d80579e0d8a8e89071be77239f4b (diff)
downloadbitbake-802d4389c560d1759e0fbed99515c50b868ed401.tar.gz
data.py: Split expandKeys into two for loops to benefit from the expand_cache (12% speedup)
-rw-r--r--ChangeLog2
-rw-r--r--lib/bb/data.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 37f5017ac..a1da18db4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,7 +30,7 @@ Changes in Bitbake 1.8.x:
error message.
- Rework add_task to be more efficient (6% speedup, 7% number of function calls reduction)
- Sort digraph output to make builds more reproducible
-
+ - Split expandKeys into two for loops to benefit from the expand_cache (12% speedup)
Changes in Bitbake 1.8.6:
- Correctly redirect stdin when forking
diff --git a/lib/bb/data.py b/lib/bb/data.py
index 21cdde04a..7ad1acad1 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -282,6 +282,7 @@ def expandKeys(alterdata, readdata = None):
if readdata == None:
readdata = alterdata
+ todolist = {}
for key in keys(alterdata):
if not '${' in key:
continue
@@ -289,7 +290,13 @@ def expandKeys(alterdata, readdata = None):
ekey = expand(key, readdata)
if key == ekey:
continue
+ todolist[key] = ekey
+ # These two for loops are split for performance to maximise the
+ # usefulness of the expand cache
+
+ for key in todolist:
+ ekey = todolist[key]
renameVar(key, ekey, alterdata)
def expandData(alterdata, readdata = None):