diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-19 22:27:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-21 16:53:46 +0000 |
commit | 566c0e874fc1610f3f97737b5601ef22026c918a (patch) | |
tree | f9816d13f14332797fad4234614e981054753fe6 /meta | |
parent | cc2d2abad25a82ce722ac255a631430058f8de30 (diff) | |
download | openembedded-core-566c0e874fc1610f3f97737b5601ef22026c918a.tar.gz openembedded-core-566c0e874fc1610f3f97737b5601ef22026c918a.tar.bz2 openembedded-core-566c0e874fc1610f3f97737b5601ef22026c918a.zip |
utils: Optimise looping in base_set_filespath
Calling split on the same expression, once per loop iteration is
inefficent and pointless, particularly in a function called by
every recipe during parsing.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/utils.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass index 52e511f5cf..c1de2f6930 100644 --- a/meta/classes/utils.bbclass +++ b/meta/classes/utils.bbclass @@ -308,10 +308,10 @@ def base_set_filespath(path, d): if extrapaths != "": path = extrapaths.split(":") + path # The ":" ensures we have an 'empty' override - overrides = (d.getVar("OVERRIDES", True) or "") + ":" + overrides = ((d.getVar("OVERRIDES", True) or "") + ":").split(":") for p in path: if p != "": - for o in overrides.split(":"): + for o in overrides: filespath.append(os.path.join(p, o)) return ":".join(filespath) |