From 1522ec0028d30d75afbf194109c0c8fbc3721a41 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 16 Oct 2026 13:14:39 +0200 Subject: [PATCH] html: drop unused row identifiers Every source row carried an id="row-N" attribute, but neither the viewer's navigation nor its styles refer to it. Remove the attribute and its counter, which saves about 2% of a large report's size. --- samples/arguments.html | 34 +++++++++++++++---------------- samples/indentation.html | 44 ++++++++++++++++++++-------------------- src/html.c | 5 ++--- 3 files changed, 41 insertions(+), 42 deletions(-) diff --git a/samples/arguments.html b/samples/arguments.html index 3f25e9d..df7d941 100644 --- a/samples/arguments.html +++ b/samples/arguments.html @@ -375,26 +375,26 @@

Within aligned pairs: left text / right text that differs, independently of patch signs. Whitespace uses the same colors: separate space blocks distinguish spaces from tabs; tabs fill their tab stops. Hover for details.

Delta differences

Code changes that differ between the patches. Old / new are each patch’s parent / result line numbers. Signs belong to that patch. Shared edits are additions or removals both patches make.

record.crecord.c

oldnew
oldnew
static void update_record(struct record *record, int value)
static void update_record(struct record *record, int value)
-
11static void update_record(struct record *record, int value)
11static void update_record(struct record *record, int value)
-
22{
22{
-
33 if (!record->active)
-
44 return;
-
+3 write_seqcount_begin(&record->seq);
+5 write_seqcount_begin(&record->state.seq);
-
34 record->value = value;
56 record->value = value;
-
+5 record->generation++;
+7 record->generation++;
-
+6 write_seqcount_end(&record->seq);
+8 write_seqcount_end(&record->state.seq);
-
47}
69}
+
11static void update_record(struct record *record, int value)
11static void update_record(struct record *record, int value)
+
22{
22{
+
33 if (!record->active)
+
44 return;
+
+3 write_seqcount_begin(&record->seq);
+5 write_seqcount_begin(&record->state.seq);
+
34 record->value = value;
56 record->value = value;
+
+5 record->generation++;
+7 record->generation++;
+
+6 write_seqcount_end(&record->seq);
+8 write_seqcount_end(&record->state.seq);
+
47}
69}

Context differences

Surrounding code in the results. Signs mark lines present in only one result: − left, + right.

record.crecord.c

new
new
static void update_record(struct record *record, int value)
static void update_record(struct record *record, int value)
-
1static void update_record(struct record *record, int value)
1static void update_record(struct record *record, int value)
-
2{
2{
-
+3 if (!record->active)
-
+4 return;
-
-3 write_seqcount_begin(&record->seq);
+5 write_seqcount_begin(&record->state.seq);
-
4 record->value = value;
6 record->value = value;
-
5 record->generation++;
7 record->generation++;
-
-6 write_seqcount_end(&record->seq);
+8 write_seqcount_end(&record->state.seq);
+
1static void update_record(struct record *record, int value)
1static void update_record(struct record *record, int value)
+
2{
2{
+
+3 if (!record->active)
+
+4 return;
+
-3 write_seqcount_begin(&record->seq);
+5 write_seqcount_begin(&record->state.seq);
+
4 record->value = value;
6 record->value = value;
+
5 record->generation++;
7 record->generation++;
+
-6 write_seqcount_end(&record->seq);
+8 write_seqcount_end(&record->state.seq);
diff --git a/samples/indentation.html b/samples/indentation.html index a205474..58db51f 100644 --- a/samples/indentation.html +++ b/samples/indentation.html @@ -374,32 +374,32 @@ -

Within aligned pairs: left text / right text that differs, independently of patch signs. Whitespace uses the same colors: separate space blocks distinguish spaces from tabs; tabs fill their tab stops. Hover for details.

Delta differences

Code changes that differ between the patches. Old / new are each patch’s parent / result line numbers. Signs belong to that patch. Shared edits are additions or removals both patches make.

request.crequest.c

oldnew
oldnew
33 int ret = -EAGAIN;
-
44
44
-
55 if (req->ready) {
55 if (!req->ready)
-
66 return -EAGAIN;
-
+6 req->attempts++;
+7 req->attempts++;
-
+7 trace_submit(req);
+8 trace_submit(req);
-
68 ret = queue_request(req);
79 ret = queue_request(req);
-
79 if (!ret)
810 if (!ret)
-
810 req->submitted = true;
911 req->submitted = true;
+

Within aligned pairs: left text / right text that differs, independently of patch signs. Whitespace uses the same colors: separate space blocks distinguish spaces from tabs; tabs fill their tab stops. Hover for details.

Delta differences

Code changes that differ between the patches. Old / new are each patch’s parent / result line numbers. Signs belong to that patch. Shared edits are additions or removals both patches make.

request.crequest.c

oldnew
oldnew
33 int ret = -EAGAIN;
+
44
44
+
55 if (req->ready) {
55 if (!req->ready)
+
66 return -EAGAIN;
+
+6 req->attempts++;
+7 req->attempts++;
+
+7 trace_submit(req);
+8 trace_submit(req);
+
68 ret = queue_request(req);
79 ret = queue_request(req);
+
79 if (!ret)
810 if (!ret)
+
810 req->submitted = true;
911 req->submitted = true;

counter.ccounter.c

oldnew
oldnew
static void reset_counter(struct counter *counter)
static void reset_counter(struct counter *counter)
-
11static void reset_counter(struct counter *counter)
11static void reset_counter(struct counter *counter)
-
22{
22{
-
+3 counter->generation++;
+3 counter->generation++;
-
34 counter->value = 0;
34 counter->value = 0;
-
45}
45}
+
11static void reset_counter(struct counter *counter)
11static void reset_counter(struct counter *counter)
+
22{
22{
+
+3 counter->generation++;
+3 counter->generation++;
+
34 counter->value = 0;
34 counter->value = 0;
+
45}
45}
-

Context differences

Surrounding code in the results. Signs mark lines present in only one result: − left, + right.

request.crequest.c

new
new
4
4
-
-5 if (req->ready) {
+5 if (!req->ready)
-
+6 return -EAGAIN;
-
-6 req->attempts++;
+7 req->attempts++;
-
-7 trace_submit(req);
+8 trace_submit(req);
-
-8 ret = queue_request(req);
+9 ret = queue_request(req);
-
-9 if (!ret)
+10 if (!ret)
-
-10 req->submitted = true;
+11 req->submitted = true;
+

Context differences

Surrounding code in the results. Signs mark lines present in only one result: − left, + right.

request.crequest.c

new
new
4
4
+
-5 if (req->ready) {
+5 if (!req->ready)
+
+6 return -EAGAIN;
+
-6 req->attempts++;
+7 req->attempts++;
+
-7 trace_submit(req);
+8 trace_submit(req);
+
-8 ret = queue_request(req);
+9 ret = queue_request(req);
+
-9 if (!ret)
+10 if (!ret)
+
-10 req->submitted = true;
+11 req->submitted = true;
Generated by diffofdiffs 1.1.0
diff --git a/src/html.c b/src/html.c index f08a01c..ca847a6 100644 --- a/src/html.c +++ b/src/html.c @@ -21,7 +21,6 @@ struct html_layout { size_t width; size_t digits; - size_t row; }; /* clang-format off */ @@ -294,8 +293,8 @@ static void write_source_pair(FILE *out, const struct review_pair *pair, text[0] = left; text[1] = right; highlight_pair(raw, text, &h); - fprintf(out, "
row++, change_start ? " data-change-start" : ""); + fprintf(out, "