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:54:14 -0800
commitae41df7b37098fe6a427aa26a3bc711c06e20767 (patch)
treedc73762001ece0d8bce33391084d536bc9f9edc2 /bitbake
parentac3e66f1a666a1177b3677de56356cae10e5fe1a (diff)
downloadpoky-ae41df7b37098fe6a427aa26a3bc711c06e20767.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: f40a3a477d5241b697bf2fb030dd804c1ff5839f) 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 75aef96a02..439da2bb44 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2759,8 +2759,12 @@ class RunQueueExecute:
2759 logger.debug2("%s was unavailable and is a hard dependency of %s so skipping" % (task, dep)) 2759 logger.debug2("%s was unavailable and is a hard dependency of %s so skipping" % (task, dep))
2760 self.sq_task_failoutright(dep) 2760 self.sq_task_failoutright(dep)
2761 continue 2761 continue
2762
2763 # For performance, only compute allcovered once if needed
2764 if self.sqdata.sq_deps[task]:
2765 allcovered = self.scenequeue_covered | self.scenequeue_notcovered
2762 for dep in sorted(self.sqdata.sq_deps[task]): 2766 for dep in sorted(self.sqdata.sq_deps[task]):
2763 if self.sqdata.sq_revdeps[dep].issubset(self.scenequeue_covered | self.scenequeue_notcovered): 2767 if self.sqdata.sq_revdeps[dep].issubset(allcovered):
2764 if dep not in self.sq_buildable: 2768 if dep not in self.sq_buildable:
2765 self.sq_buildable.add(dep) 2769 self.sq_buildable.add(dep)
2766 2770