summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-16 13:11:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-21 15:30:13 +0100
commitfece8f4737bb15db04b82b816822b1fe744d9be8 (patch)
tree6c9663b29fb5284d6c370363e1c95f598eeaf6d7
parent3afc48c38f3e5e0b6ff53dead13ee4bbcf4105bc (diff)
downloadopenembedded-core-contrib-fece8f4737bb15db04b82b816822b1fe744d9be8.tar.gz
openembedded-core-contrib-fece8f4737bb15db04b82b816822b1fe744d9be8.tar.bz2
openembedded-core-contrib-fece8f4737bb15db04b82b816822b1fe744d9be8.zip
bitbake: runqueue: Optimise holdoff task handling
We don't need to process the holdoff task list until we're executing tasks which saves some data manipulation, at the cost of some data structures not being correct at all times. This saves significant amounts of time in various profile charts of larger builds. (Bitbake rev: 270f076111b12eab358417b0c4cf9c70d7cc787a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/runqueue.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 88212ca00c..0c17a23bdc 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1711,6 +1711,7 @@ class RunQueueExecute:
self.stampcache = {}
self.holdoff_tasks = set()
+ self.holdoff_need_update = True
self.sqdone = False
self.stats = RunQueueStats(len(self.rqdata.runtaskentries))
@@ -2057,6 +2058,8 @@ class RunQueueExecute:
self.rq.state = runQueueComplete
return True
+ self.update_holdofftasks()
+
if self.cooker.configuration.setsceneonly:
task = None
else:
@@ -2194,6 +2197,9 @@ class RunQueueExecute:
return taskdepdata
def update_holdofftasks(self):
+
+ if not self.holdoff_need_update:
+ return
self.holdoff_tasks = set()
for tid in self.rqdata.runq_setscene_tids:
@@ -2205,6 +2211,8 @@ class RunQueueExecute:
if dep not in self.runq_complete:
self.holdoff_tasks.add(dep)
+ self.holdoff_need_update = False
+
def process_possible_migrations(self):
changed = set()
@@ -2324,7 +2332,7 @@ class RunQueueExecute:
self.sqdone = False
if changed:
- self.update_holdofftasks()
+ self.holdoff_need_update = True
def scenequeue_updatecounters(self, task, fail=False):
@@ -2373,7 +2381,7 @@ class RunQueueExecute:
self.tasks_covered = covered
self.tasks_notcovered = notcovered
- self.update_holdofftasks()
+ self.holdoff_need_update = True
def sq_task_completeoutright(self, task):
"""