summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cache.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-28 15:31:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-28 20:48:08 +0000
commit1b08a7eb8b708f4d0fc119cf89deb450fa62fea1 (patch)
treecdd4c9656d94264e6c55d8632788cb39a04d1d65 /bitbake/lib/bb/cache.py
parentd5e12a1bfbb4d00b49209c602a68628b1b626898 (diff)
downloadpoky-1b08a7eb8b708f4d0fc119cf89deb450fa62fea1.tar.gz
bitbake/cache/runqueue.py: Move workload for recipe parsing to the child process
Parsing the recipe in the parent before forking off the child worker can mean the parent doesn't hit the idle loop and becomes a bottleneck when lauching many short lived processes. The reason we need this in the parent is to figure out the fakeroot environmental options. To address this, add the fakeroot variables to the cache and move recipe loadData into the child task. For a poky-image-sato build this results in about a 2 minute speedup (1.8%). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cache.py')
-rw-r--r--bitbake/lib/bb/cache.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 421bd79183..c56b4b4248 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -43,7 +43,7 @@ except ImportError:
43 logger.info("Importing cPickle failed. " 43 logger.info("Importing cPickle failed. "
44 "Falling back to a very slow implementation.") 44 "Falling back to a very slow implementation.")
45 45
46__cache_version__ = "137" 46__cache_version__ = "138"
47 47
48recipe_fields = ( 48recipe_fields = (
49 'pn', 49 'pn',
@@ -78,6 +78,8 @@ recipe_fields = (
78 'summary', 78 'summary',
79 'license', 79 'license',
80 'section', 80 'section',
81 'fakerootenv',
82 'fakerootdirs'
81) 83)
82 84
83 85
@@ -172,6 +174,8 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
172 summary = cls.getvar('SUMMARY', metadata), 174 summary = cls.getvar('SUMMARY', metadata),
173 license = cls.getvar('LICENSE', metadata), 175 license = cls.getvar('LICENSE', metadata),
174 section = cls.getvar('SECTION', metadata), 176 section = cls.getvar('SECTION', metadata),
177 fakerootenv = cls.getvar('FAKEROOTENV', metadata),
178 fakerootdirs = cls.getvar('FAKEROOTDIRS', metadata),
175 ) 179 )
176 180
177 181
@@ -584,6 +588,8 @@ class CacheData(object):
584 self.summary = {} 588 self.summary = {}
585 self.license = {} 589 self.license = {}
586 self.section = {} 590 self.section = {}
591 self.fakerootenv = {}
592 self.fakerootdirs = {}
587 593
588 # Indirect Cache variables (set elsewhere) 594 # Indirect Cache variables (set elsewhere)
589 self.ignored_dependencies = [] 595 self.ignored_dependencies = []
@@ -647,3 +653,5 @@ class CacheData(object):
647 self.summary[fn] = info.summary 653 self.summary[fn] = info.summary
648 self.license[fn] = info.license 654 self.license[fn] = info.license
649 self.section[fn] = info.section 655 self.section[fn] = info.section
656 self.fakerootenv[fn] = info.fakerootenv
657 self.fakerootdirs[fn] = info.fakerootdirs