diff options
author | 2024-11-29 18:51:36 +0000 | |
---|---|---|
committer | 2024-12-03 06:34:38 -0800 | |
commit | f40a3a477d5241b697bf2fb030dd804c1ff5839f (patch) | |
tree | 63a7bdd21a2374c04d75485463ef23481a8ab863 | |
parent | 28569e9796d4b34d7b77b4f79074ab7854850386 (diff) | |
download | bitbake-f40a3a477d5241b697bf2fb030dd804c1ff5839f.tar.gz |
runqueue: Fix scenetask processing performance issueyocto-5.0.62024-04.6-scarthgap2.8.6
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 923c19b9713e398d8e66e6d4422dfd4c18a03486)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | lib/bb/runqueue.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 75aef96a0..439da2bb4 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -2759,8 +2759,12 @@ class RunQueueExecute: logger.debug2("%s was unavailable and is a hard dependency of %s so skipping" % (task, dep)) self.sq_task_failoutright(dep) continue + + # For performance, only compute allcovered once if needed + if self.sqdata.sq_deps[task]: + allcovered = self.scenequeue_covered | self.scenequeue_notcovered for dep in sorted(self.sqdata.sq_deps[task]): - if self.sqdata.sq_revdeps[dep].issubset(self.scenequeue_covered | self.scenequeue_notcovered): + if self.sqdata.sq_revdeps[dep].issubset(allcovered): if dep not in self.sq_buildable: self.sq_buildable.add(dep) |