aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-15 17:47:59 +0000
committerArmin Kuster <akuster808@gmail.com>2019-12-17 22:14:47 -0800
commit7fa3ede953971f761d8cafafa37d1bcb65ad6a77 (patch)
treeb1041f474cad9b08a13dba83e205ce3cc3894c35
parent14babbf0a32637db640e0494b0331397dcb0f715 (diff)
downloadbitbake-contrib-7fa3ede953971f761d8cafafa37d1bcb65ad6a77.tar.gz
runqueue: Optimise task filtering
We were seeing this running thousands of times with hashequiv, do the filtering where it makes more sense and make it persist. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2cfeb9998a8ad5b1dcda0bb4e192c5e4306dab17)
-rw-r--r--lib/bb/runqueue.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 73775d976..b90ac875e 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -148,8 +148,9 @@ class RunQueueScheduler(object):
"""
Return the id of the first task we find that is buildable
"""
+ # Once tasks are running we don't need to worry about them again
+ self.buildable.difference_update(self.rq.runq_running)
buildable = set(self.buildable)
- buildable.difference_update(self.rq.runq_running)
buildable.difference_update(self.rq.holdoff_tasks)
buildable.intersection_update(self.rq.tasks_covered | self.rq.tasks_notcovered)
if not buildable:
@@ -207,8 +208,6 @@ class RunQueueScheduler(object):
def newbuildable(self, task):
self.buildable.add(task)
- # Once tasks are running we don't need to worry about them again
- self.buildable.difference_update(self.rq.runq_running)
def removebuildable(self, task):
self.buildable.remove(task)