From 1b08a7eb8b708f4d0fc119cf89deb450fa62fea1 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 28 Feb 2011 15:31:20 +0000 Subject: 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 --- bitbake/lib/bb/cache.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/cache.py') 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: logger.info("Importing cPickle failed. " "Falling back to a very slow implementation.") -__cache_version__ = "137" +__cache_version__ = "138" recipe_fields = ( 'pn', @@ -78,6 +78,8 @@ recipe_fields = ( 'summary', 'license', 'section', + 'fakerootenv', + 'fakerootdirs' ) @@ -172,6 +174,8 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)): summary = cls.getvar('SUMMARY', metadata), license = cls.getvar('LICENSE', metadata), section = cls.getvar('SECTION', metadata), + fakerootenv = cls.getvar('FAKEROOTENV', metadata), + fakerootdirs = cls.getvar('FAKEROOTDIRS', metadata), ) @@ -584,6 +588,8 @@ class CacheData(object): self.summary = {} self.license = {} self.section = {} + self.fakerootenv = {} + self.fakerootdirs = {} # Indirect Cache variables (set elsewhere) self.ignored_dependencies = [] @@ -647,3 +653,5 @@ class CacheData(object): self.summary[fn] = info.summary self.license[fn] = info.license self.section[fn] = info.section + self.fakerootenv[fn] = info.fakerootenv + self.fakerootdirs[fn] = info.fakerootdirs -- cgit v1.2.3-54-g00ecf