summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-11-29 18:51:36 +0000
committerSteve Sakoman <steve@sakoman.com>2024-12-09 06:25:53 -0800
commitf23d3a5603d792df1395e33a4605f6e2e2cca747 (patch)
tree0cc9d9c22809aba28b5ff84127bc25b53830ad33 /bitbake
parentd4efa698f2912a4ec72d53d6d7d5ba426e3a4a32 (diff)
downloadpoky-f23d3a5603d792df1395e33a4605f6e2e2cca747.tar.gz
bitbake: runqueue: Fix scenetask processing performance issue
Analysis shows that "bitbake core-image-ptest-all" spends a lot of time in scenequeue_updatecounters and much of it is rebuilding a set which doens't change. Reorder the code to avoid that performance glitch. (Bitbake rev: 1452e74cc4ddfaadc6537a049877a66cec253c8d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 923c19b9713e398d8e66e6d4422dfd4c18a03486) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index b34e2d5607..7f95140c49 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2756,8 +2756,12 @@ class RunQueueExecute:
2756 logger.debug2("%s was unavailable and is a hard dependency of %s so skipping" % (task, dep)) 2756 logger.debug2("%s was unavailable and is a hard dependency of %s so skipping" % (task, dep))
2757 self.sq_task_failoutright(dep) 2757 self.sq_task_failoutright(dep)
2758 continue 2758 continue
2759
2760 # For performance, only compute allcovered once if needed
2761 if self.sqdata.sq_deps[task]:
2762 allcovered = self.scenequeue_covered | self.scenequeue_notcovered
2759 for dep in sorted(self.sqdata.sq_deps[task]): 2763 for dep in sorted(self.sqdata.sq_deps[task]):
2760 if self.sqdata.sq_revdeps[dep].issubset(self.scenequeue_covered | self.scenequeue_notcovered): 2764 if self.sqdata.sq_revdeps[dep].issubset(allcovered):
2761 if dep not in self.sq_buildable: 2765 if dep not in self.sq_buildable:
2762 self.sq_buildable.add(dep) 2766 self.sq_buildable.add(dep)
2763 2767