Skip to content

perf(bench): batch the template fan-out coverage pass by bytes #1373 - #2200

Merged
nc9 merged 1 commit into
mainfrom
perf/coverage-byte-batches
Nov 21, 2026
Merged

nc9 merged 1 commit into
mainfrom
perf/coverage-byte-batches

Conversation

@nc9

@nc9 nc9 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2195 (#1373). The coverage pass batched by page count. On openelectricity.org.au (~1.7 MB HTML/page) the default --batch 200 peaked at ~6.6 GB RSS, while --batch 25 peaked at 1.2-1.8 GB (Daytona sandbox, 11-21).

Now the pass fills each batch until ~256 MB of HTML (UTF-8 bytes) or --batch pages (ceiling), whichever first; an oversized single page is its own batch. New --batch-bytes option. Storage is read 25 pages at a time. Helper: apps/cli/scripts/byte-batches.ts (takeByteBatch, byteBatches).

Tests: apps/cli/tests/coverage-byte-batches.test.ts (cap, ceiling, once-in-order, read overshoot, streamed == all-at-once for current and derived). Mutating the cap check fails 2 of them.

Gates: cli format:check, lint, typecheck clean; test-suites --check ok; audit-engine suite 2379 pass, 0 fail. No public API change, no changelog entry. The squirrelscan agent skill needs no change.

@nc9
nc9 marked this pull request as ready for review November 21, 2026 02:45
@nc9
nc9 merged commit b1503be into main Nov 21, 2026
8 of 15 checks passed
@nc9
nc9 deleted the perf/coverage-byte-batches branch November 21, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant