siggen: Fix performance issue in get_unihash
PATCH 1/1 siggen: Fix performance issue in get_unihash
There is a significant performance issue in get_unihash(). The issue turns out to be the lookups of setscene tasks. We can fix this by using a set() instead of the current list.
Signed-off-by Richard Purdie <[email protected]>
--- lib/bb/siggen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
lib/bb/siggen.py +3 -3
@@ -44,7 +44,7 @@ class SignatureGenerator(object): self.file_checksum_values = {} self.taints = {} self.unitaskhashes = {} - self.setscenetasks = {} + self.setscenetasks = set() def finalise(self, fn, d, varient): return
@@ -110,7 +110,7 @@ class SignatureGeneratorBasic(SignatureGenerator): self.taints = {} self.gendeps = {} self.lookupcache = {} - self.setscenetasks = {} + self.setscenetasks = set() self.basewhitelist = set((data.getVar("BB_HASHBASE_WHITELIST") or "").split()) self.taskwhitelist = None self.init_rundepcheck(data)
@@ -157,7 +157,7 @@ class SignatureGeneratorBasic(SignatureGenerator): return taskdeps def set_setscene_tasks(self, setscene_tasks): - self.setscenetasks = setscene_tasks + self.setscenetasks = set(setscene_tasks) def finalise(self, fn, d, variant):
Signature · 1 line
2.20.1