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. (From OE-Core rev: 566c0e874fc1610f3f97737b5601ef22026c918a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
e6b313d68e
commit
73ef532777
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue