diff mbox series

[v2,kirkstone,2/2] bitbake-diffsigs: break on first dependent task difference

Message ID 20230208125938.3943013-2-mikko.rapeli@linaro.org
State Accepted, archived
Commit 89f13cd4a927a73de98998c27082c63b07671525
Headers show
Series [v2,kirkstone,1/2] bitbake-diffsigs: Make PEP8 compliant | expand

Commit Message

Mikko Rapeli Feb. 8, 2023, 12:59 p.m. UTC
From: "Schmidt, Adriaan" <adriaan.schmidt@siemens.com>

compare_sigfiles() recursively calculates differences on all dependent
tasks with changed hashes. This is done in arbitrary/alphabetical order, and
only the last of those results is returned, while everything else is discarded.

This changes the behavior to instead return the first difference and not calculate
any more, which significantly speeds up diffs of tasks with many dependencies.

(Bitbake rev: ea6a676c9aa2864c2eff40eea41ba09ce903a651)

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 bitbake/lib/bb/siggen.py | 1 +
 1 file changed, 1 insertion(+)

v2: correct list, removed "bitbake:" subject prefix

v1: sent to openembedded-core list
diff mbox series

Patch

diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 9a20fc8e5f..fa2915d164 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -1028,6 +1028,7 @@  def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
                             # If a dependent hash changed, might as well print the line above and then defer to the changes in
                             # that hash since in all likelyhood, they're the same changes this task also saw.
                             output = [output[-1]] + recout
+                            break
 
     a_taint = a_data.get('taint', None)
     b_taint = b_data.get('taint', None)