mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 00:32:12 +02:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user