Commit cc9d5620d6 for bind

commit cc9d5620d6a54192c15e6b30b4d7fe99bab23eef
Author: Alessio Podda <alessio@isc.org>
Date:   Thu Sep 3 15:39:00 2026 +0200

    Minimize DNSSEC diffs in one pass

    Append the signature diff without minimizing it first, then minimize it
    together with the NSEC or NSEC3 diff. This avoids building a hash map
    and scanning the destination twice.

diff --git a/lib/dns/update.c b/lib/dns/update.c
index e859106020..73eb66d19f 100644
--- a/lib/dns/update.c
+++ b/lib/dns/update.c
@@ -1781,8 +1781,12 @@ next_state:
 	case update_nsec3:
 		state->state = update_nsec3;

-		/* Record our changes for the journal. */
-		dns_diff_appendlistminimal(diff, &state->sig_diff);
+		/*
+		 * Record our changes for the journal. Minimize both lists in
+		 * one pass; dns_diff_appendlistminimal() also minimizes tuples
+		 * already present in diff.
+		 */
+		dns_diff_appendlist(diff, &state->sig_diff);
 		dns_diff_appendlistminimal(diff, &state->nsec_mindiff);

 		INSIST(ISC_LIST_EMPTY(state->sig_diff.tuples));
@@ -1942,8 +1946,12 @@ next_state:
 		}
 		dns_diff_appendlist(&state->nsec_mindiff, &state->work);

-		/* Record our changes for the journal. */
-		dns_diff_appendlistminimal(diff, &state->sig_diff);
+		/*
+		 * Record our changes for the journal. Minimize both lists in
+		 * one pass; dns_diff_appendlistminimal() also minimizes tuples
+		 * already present in diff.
+		 */
+		dns_diff_appendlist(diff, &state->sig_diff);
 		dns_diff_appendlistminimal(diff, &state->nsec_mindiff);

 		INSIST(ISC_LIST_EMPTY(state->sig_diff.tuples));