bitbake-diffsigs: break on first dependent task difference

Message ID 20220506121033.1212704-1-adriaan.schmidt@siemens.com
State Accepted, archived
Commit ea6a676c9aa2864c2eff40eea41ba09ce903a651
Headers show
Series bitbake-diffsigs: break on first dependent task difference | expand

Commit Message

Adriaan Schmidt May 6, 2022, 12:10 p.m. UTC
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.

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 lib/bb/siggen.py | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 9fa568f6..08eca786 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -1026,6 +1026,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)