[v2,3/7] bitbake-diffsigs: break on first dependent task difference

Message ID 20220509101604.3249558-4-adriaan.schmidt@siemens.com
State Accepted, archived
Headers show
Series Sstate maintenance script | expand

Commit Message

Schmidt, Adriaan May 9, 2022, 2:16 a.m. UTC
Currently compare_sigfiles() recursively calculates differences on all
dependent tasks with changed hashes. This is done in arbitrary order, and
only the last of those results is returned while everything else is discarded.

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

backported from upstream:
https://git.openembedded.org/bitbake/commit/?id=8ed7722865d2dcfda1697aaf4e12b828934bf527

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

Patch

diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 8b23fd04..767aeb0a 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -980,6 +980,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)