diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2007-08-17 23:35:17 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2007-08-17 23:35:17 +0000 |
commit | 0dd28a461b7dc1a997715b13e7b26aa775380cfa (patch) | |
tree | 88e4d4aa7198cca71bc2a474f19b41fb415e416c /lib/bb/data.py | |
parent | 6feef6e7d33a42343447e234eb97000c6513958f (diff) | |
download | bitbake-0dd28a461b7dc1a997715b13e7b26aa775380cfa.tar.gz |
data.py: Split expandKeys into two for loops to benefit from the expand_cache (12% speedup)
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r-- | lib/bb/data.py | 7 |
1 files changed, 7 insertions, 0 deletions
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): |