summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-31 13:31:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-01 11:20:42 +0000
commit8f6b9c75a799e9005393bf06d945e2fb0634a265 (patch)
tree810c54a57fc9526abd0640b794603230ffaa043a /bitbake/lib/bb/cooker.py
parent602da7c921e3cb95637d39332cfc1188e0a386d2 (diff)
downloadpoky-8f6b9c75a799e9005393bf06d945e2fb0634a265.tar.gz
bitbake: cooker: Only start as many parse threads as we need
If we're only going to parse one recipe, no point in starting a large number of threads. (Bitbake rev: b977faf59dc08050a44a16032fe52d1bbb80f2a1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index a1182ef461..1f4174f77f 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1986,8 +1986,6 @@ class CookerParser(object):
1986 self.total = len(filelist) 1986 self.total = len(filelist)
1987 1987
1988 self.current = 0 1988 self.current = 0
1989 self.num_processes = int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or
1990 multiprocessing.cpu_count())
1991 self.process_names = [] 1989 self.process_names = []
1992 1990
1993 self.bb_cache = bb.cache.Cache(self.cfgdata, self.cfghash, cooker.caches_array) 1991 self.bb_cache = bb.cache.Cache(self.cfgdata, self.cfghash, cooker.caches_array)
@@ -2002,6 +2000,9 @@ class CookerParser(object):
2002 self.toparse = self.total - len(self.fromcache) 2000 self.toparse = self.total - len(self.fromcache)
2003 self.progress_chunk = max(self.toparse / 100, 1) 2001 self.progress_chunk = max(self.toparse / 100, 1)
2004 2002
2003 self.num_processes = min(int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or
2004 multiprocessing.cpu_count()), len(self.willparse))
2005
2005 self.start() 2006 self.start()
2006 self.haveshutdown = False 2007 self.haveshutdown = False
2007 2008