summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-17 16:18:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-18 13:59:06 +0000
commitc204cc47d0a319d0435c4a9ba06e241c2e75ff1e (patch)
tree335e80d6b956e0327156aa8eed3811498b735c07 /bitbake/lib/bb/cooker.py
parentfe857e4179355bcfb79303c16baf3ad87fca59a4 (diff)
downloadpoky-c204cc47d0a319d0435c4a9ba06e241c2e75ff1e.tar.gz
bitbake: cooker/siggen: Empty siggen cache during parsing
When parsing recipes its apparent the memory usage of bitbake rises linearly with number of recipes parsed. It shouldn't. Using tracemalloc (thanks for the tip Joshua Lock) it was clear that the dependency information left behind in siggen was the culprit. Add a new method to allow us to drop this information. We don't need it after the recipe has been parsed and hashes calculated (at runtime its different but only the currently executing task would be in memory). This should give signficant memory usage improvements for bitbake and that in turn should help speed on more constrained systems, as well as when used in multiconfig environments. (Bitbake rev: ef29309d0b512b64d024e383e7baff22c727711c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 911805a6e3..d2d308ae20 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1944,7 +1944,8 @@ class Parser(multiprocessing.Process):
1944 except IndexError: 1944 except IndexError:
1945 break 1945 break
1946 result = self.parse(*job) 1946 result = self.parse(*job)
1947 1947 # Clear the siggen cache after parsing to control memory usage, its huge
1948 bb.parse.siggen.postparsing_clean_cache()
1948 try: 1949 try:
1949 self.results.put(result, timeout=0.25) 1950 self.results.put(result, timeout=0.25)
1950 except queue.Full: 1951 except queue.Full: