From 7c4e8e0def43305bf838f948c89b320f72e94b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Sz=C5=91ke?= Date: Mon, 20 Jan 2025 08:31:34 +0100 Subject: [PATCH] bitbake: runqueue: Optimize loop in scenequeue data construction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In scenequeue data generation loop, progress bar update in each cycle cause a significant loss of speed. Remove progress bar update in for loop. It was become quite fast (faster 30 times, about) without progress bar update. (Bitbake rev: f775e53f1196e3e5d0ded277c061c5c268b3b28d) Signed-off-by: Benjamin Szőke Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 8fadc8338e..80f3d3282f 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -3034,14 +3034,13 @@ def build_scenequeue_data(sqdata, rqdata, sqrq): rqdata.init_progress_reporter.next_stage(len(rqdata.runtaskentries)) # Sanity check all dependencies could be changed to setscene task references - for taskcounter, tid in enumerate(rqdata.runtaskentries): + for tid in rqdata.runtaskentries: if tid in rqdata.runq_setscene_tids: pass elif sq_revdeps_squash[tid]: bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, halting. Please report this problem.") else: del sq_revdeps_squash[tid] - rqdata.init_progress_reporter.update(taskcounter) rqdata.init_progress_reporter.next_stage()