summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-15 17:47:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-11 11:06:22 +0000
commitfb65235aca994d6e802351e609f6f6c0ecc22a29 (patch)
tree8f797fb155612cdb5c0867e83e32f55ca4ebebcb /bitbake
parent014558f14c275237e3b64d24f117cd05b1236b5a (diff)
downloadpoky-fb65235aca994d6e802351e609f6f6c0ecc22a29.tar.gz
bitbake: 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. (Bitbake rev: 7fa3ede953971f761d8cafafa37d1bcb65ad6a77) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2cfeb9998a8ad5b1dcda0bb4e192c5e4306dab17) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 73775d9761..b90ac875e3 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -148,8 +148,9 @@ class RunQueueScheduler(object):
148 """ 148 """
149 Return the id of the first task we find that is buildable 149 Return the id of the first task we find that is buildable
150 """ 150 """
151 # Once tasks are running we don't need to worry about them again
152 self.buildable.difference_update(self.rq.runq_running)
151 buildable = set(self.buildable) 153 buildable = set(self.buildable)
152 buildable.difference_update(self.rq.runq_running)
153 buildable.difference_update(self.rq.holdoff_tasks) 154 buildable.difference_update(self.rq.holdoff_tasks)
154 buildable.intersection_update(self.rq.tasks_covered | self.rq.tasks_notcovered) 155 buildable.intersection_update(self.rq.tasks_covered | self.rq.tasks_notcovered)
155 if not buildable: 156 if not buildable:
@@ -207,8 +208,6 @@ class RunQueueScheduler(object):
207 208
208 def newbuildable(self, task): 209 def newbuildable(self, task):
209 self.buildable.add(task) 210 self.buildable.add(task)
210 # Once tasks are running we don't need to worry about them again
211 self.buildable.difference_update(self.rq.runq_running)
212 211
213 def removebuildable(self, task): 212 def removebuildable(self, task):
214 self.buildable.remove(task) 213 self.buildable.remove(task)