summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-27 16:14:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-27 17:55:51 +0100
commitfd005661443b327342b9542ab42177960e1a91a9 (patch)
treeb7d3cd3c15fc8076b82b9376360ffb22b8561e27 /bitbake/lib/bb/cooker.py
parentc373727bd0551651621cb83ee934f84e58aa9ee1 (diff)
downloadpoky-fd005661443b327342b9542ab42177960e1a91a9.tar.gz
bitbake/codeparser: Improve cache handling
The current codeparser cache handling hurts performance badly even over a couple of cores and certainly on many core systems, it can spent huge amounts of time in the codeparser cache save functions. This patch reworks the cache handling so that each parsing thread saves out its own "differences" file compared to any existing core cache and then the main bitbake thread picks these up and merges things back together. This was tested on systems with small and large numbers of cores and was found to perform orders of magnitude better in all cases despite the more complex code. (Bitbake rev: 9f27563d66523f5af1028f173d53ee75e0877d46) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 9ce64dbca3..397352945e 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1161,6 +1161,7 @@ class CookerParser(object):
1161 sync = threading.Thread(target=self.bb_cache.sync) 1161 sync = threading.Thread(target=self.bb_cache.sync)
1162 sync.start() 1162 sync.start()
1163 atexit.register(lambda: sync.join()) 1163 atexit.register(lambda: sync.join())
1164 bb.codeparser.parser_cache_savemerge(self.cooker.configuration.data)
1164 1165
1165 def load_cached(self): 1166 def load_cached(self):
1166 for filename, appends in self.fromcache: 1167 for filename, appends in self.fromcache: