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>2019-12-16 23:27:14 +0000
commitf397a61f7c88b3574258deb20f737d8e4679f49b (patch)
treef5c17a536ffb63f9dba828ebffeb8392ab913f20 /bitbake
parentd98e9d86d17c62a08fd5cfe78e2350242407bb78 (diff)
downloadpoky-f397a61f7c88b3574258deb20f737d8e4679f49b.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: 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)