diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-29 18:51:36 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-29 22:13:25 +0000 |
commit | a72cd0d6d0267fd3dac8443295f67b2c50f50fcf (patch) | |
tree | 7b3240791f02780a608290f57c53dd81e358e4ff /bitbake/lib | |
parent | abc603870a9dfe160cec3b90b6c6ea0e97992f11 (diff) | |
download | poky-a72cd0d6d0267fd3dac8443295f67b2c50f50fcf.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: 923c19b9713e398d8e66e6d4422dfd4c18a03486)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 6457726d96..ffb2d28494 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -2771,8 +2771,12 @@ class RunQueueExecute: | |||
2771 | logger.debug2("%s was unavailable and is a hard dependency of %s so skipping" % (task, dep)) | 2771 | logger.debug2("%s was unavailable and is a hard dependency of %s so skipping" % (task, dep)) |
2772 | self.sq_task_failoutright(dep) | 2772 | self.sq_task_failoutright(dep) |
2773 | continue | 2773 | continue |
2774 | |||
2775 | # For performance, only compute allcovered once if needed | ||
2776 | if self.sqdata.sq_deps[task]: | ||
2777 | allcovered = self.scenequeue_covered | self.scenequeue_notcovered | ||
2774 | for dep in sorted(self.sqdata.sq_deps[task]): | 2778 | for dep in sorted(self.sqdata.sq_deps[task]): |
2775 | if self.sqdata.sq_revdeps[dep].issubset(self.scenequeue_covered | self.scenequeue_notcovered): | 2779 | if self.sqdata.sq_revdeps[dep].issubset(allcovered): |
2776 | if dep not in self.sq_buildable: | 2780 | if dep not in self.sq_buildable: |
2777 | self.sq_buildable.add(dep) | 2781 | self.sq_buildable.add(dep) |
2778 | 2782 | ||