@@ -2204,7 +2204,9 @@ class RunQueueExecute:
if nexttask in self.sqdata.outrightfail:
logger.debug2('No package found, so skipping setscene task %s', nexttask)
self.sq_task_failoutright(nexttask)
- return True
+ # Technically we should return True here but that would then start the task list back at the start
+ # which is really bad for performance ("time bitbake world -n"). Instead, keep our place in the tasklist.
+ continue
if nexttask in self.sqdata.unskippable:
logger.debug2("Setscene task %s is unskippable" % nexttask)
task = nexttask
"time bitbake world -n" shows a lot of time being spent trying to execute the setscene tasks when many of them are being skipped due to not being present. The challenge is the "return True" back into the mainloop restarts the search back at the start of the task list particularly when there are large numbers of deferred tasks due to hard dependencies. In this case we can use continue to continue within the list at the expense of not returning so quickly to loop back through the main loop. This does significantly improve performance in real world usage scenarios and we can probably afford the potential loop starvation. Thanks for the suggestion from Alexander Kanavin. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/runqueue.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)