You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Measured on synthetic repositories at halpi2's shape and a plausible larger one.
english_diff was memoised in PR Package the documentation checkers and add a blocking translation gate #1 on (stamp, page) — nine locales stamped against the same blob had each paid a git cat-file, a git diff --no-index and a temp directory for identical output. 200 pages × 9 locales went from 44.94 s to 6.32 s. Done; recorded here because the remaining items share its cause.
--comment computes every diff before learning none will fit.collect(want_diff=True) does all the git work up front and render_comment then discards it. 20 × 9 all stale: 3.3 s and 360 subprocesses spent on diffs, zero diff blocks in the output. Render the table first, measure it, and compute diffs only within the remaining budget.
Every diff is buffered in memory at once. One 6.9 MB page fully rewritten across 9 locales peaked at 483 MB RSS for a 1741-byte body; two such pages, 874 MB. Cap the retained diff per entry — nobody reads a 14 MB diff inside a collapsed <details>.
A depth-1 checkout silently loses every diff.actions/checkout defaults to fetch-depth: 1. The verdict survives, because hash-object reads the working tree, but every stamped blob lives only in history, so git cat-file fails on all of them and the report carries no diffs. The only notice is an HTML comment, invisible in rendered markdown, and neither README nor AGENTS.md mentions fetch-depth anywhere. Emit a visible line and document the requirement.
check-anchors reads every built page into memory twice. Fine at 36 pages plus an export; the same unbounded-buffer shape as the diff path.
From the review on PR #1: #1 (comment)
Measured on synthetic repositories at
halpi2's shape and a plausible larger one.english_diffwas memoised in PR Package the documentation checkers and add a blocking translation gate #1 on(stamp, page)— nine locales stamped against the same blob had each paid agit cat-file, agit diff --no-indexand a temp directory for identical output. 200 pages × 9 locales went from 44.94 s to 6.32 s. Done; recorded here because the remaining items share its cause.--commentcomputes every diff before learning none will fit.collect(want_diff=True)does all the git work up front andrender_commentthen discards it. 20 × 9 all stale: 3.3 s and 360 subprocesses spent on diffs, zero diff blocks in the output. Render the table first, measure it, and compute diffs only within the remaining budget.<details>.actions/checkoutdefaults tofetch-depth: 1. The verdict survives, becausehash-objectreads the working tree, but every stamped blob lives only in history, sogit cat-filefails on all of them and the report carries no diffs. The only notice is an HTML comment, invisible in rendered markdown, and neither README nor AGENTS.md mentionsfetch-depthanywhere. Emit a visible line and document the requirement.check-anchorsreads every built page into memory twice. Fine at 36 pages plus an export; the same unbounded-buffer shape as the diff path.