diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-12 18:57:13 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-15 09:08:43 +0000 |
commit | 766dfbdfb8fe727013cc66032475462b326691e8 (patch) | |
tree | 2b3e9766c0a198978020538abd700f2be939b6f2 /bitbake | |
parent | 1abffc542a0571f0d1512b92c1a59d138cf3ea6a (diff) | |
download | poky-766dfbdfb8fe727013cc66032475462b326691e8.tar.gz |
bitbake: 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.
(Bitbake rev: 1e561672d039ebfb8cd0e0654a44dcf48513317c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/siggen.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index dbf510238f..2fec8599b3 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -44,7 +44,7 @@ class SignatureGenerator(object): | |||
44 | self.file_checksum_values = {} | 44 | self.file_checksum_values = {} |
45 | self.taints = {} | 45 | self.taints = {} |
46 | self.unitaskhashes = {} | 46 | self.unitaskhashes = {} |
47 | self.setscenetasks = {} | 47 | self.setscenetasks = set() |
48 | 48 | ||
49 | def finalise(self, fn, d, varient): | 49 | def finalise(self, fn, d, varient): |
50 | return | 50 | return |
@@ -110,7 +110,7 @@ class SignatureGeneratorBasic(SignatureGenerator): | |||
110 | self.taints = {} | 110 | self.taints = {} |
111 | self.gendeps = {} | 111 | self.gendeps = {} |
112 | self.lookupcache = {} | 112 | self.lookupcache = {} |
113 | self.setscenetasks = {} | 113 | self.setscenetasks = set() |
114 | self.basewhitelist = set((data.getVar("BB_HASHBASE_WHITELIST") or "").split()) | 114 | self.basewhitelist = set((data.getVar("BB_HASHBASE_WHITELIST") or "").split()) |
115 | self.taskwhitelist = None | 115 | self.taskwhitelist = None |
116 | self.init_rundepcheck(data) | 116 | self.init_rundepcheck(data) |
@@ -157,7 +157,7 @@ class SignatureGeneratorBasic(SignatureGenerator): | |||
157 | return taskdeps | 157 | return taskdeps |
158 | 158 | ||
159 | def set_setscene_tasks(self, setscene_tasks): | 159 | def set_setscene_tasks(self, setscene_tasks): |
160 | self.setscenetasks = setscene_tasks | 160 | self.setscenetasks = set(setscene_tasks) |
161 | 161 | ||
162 | def finalise(self, fn, d, variant): | 162 | def finalise(self, fn, d, variant): |
163 | 163 | ||