1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

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: 2cfeb9998a8ad5b1dcda0bb4e192c5e4306dab17)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2019-12-15 17:47:59 +00:00
parent d98e9d86d1
commit f397a61f7c
+2 -3
View File
@@ -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)