<sub>PERFORMANCE&ensp;·&ensp;DIFF READING</sub> ### Ten thousand changed lines no longer arrive as ten thousand table rows. Every file opened with every hunk row already mounted. Large files paid that cost before you could read them. <picture> <source media="(max-width: 600px) and (prefers-color-scheme: dark)" srcset="https://cherry.cyberguy.fyi/d4881a955370c76a9e69b14502c29a1dc1bf61d17ece05246b7ee4743a4abf8b.svg"> <source media="(max-width: 600px)" srcset="https://cherry.cyberguy.fyi/9d4ee01fc0c15690af0b5863e90043c7ad23df3fefe2624b73d36b3dbd56816e.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://cherry.cyberguy.fyi/f0588548ad2320e6d52e2b91ca44571efc0e16f5a023902dcf1a538a6bf3ab9f.svg"> <img alt="Measured production patch view for one 10,000-line file. Before: 80,156 DOM elements and 609.3 milliseconds. After: 1,764 elements and 24.2 milliseconds. Only one file page is mounted; every line remains reachable." src="https://cherry.cyberguy.fyi/84d729afa576e41dfc99825a0bd3d3c5f9c151d031205a5b1cdf00024b97e775.svg" width="880"> </picture> ## Four files do not multiply the mounted rows | Four files, 20,000 changed lines | Before | After | | --- | ---: | ---: | | DOM elements | 160,328 | 1,903 | | Mount + forced layout, median | 1,070.8 ms | 33.9 ms | ## Where the rows stop <picture> <source media="(max-width: 600px) and (prefers-color-scheme: dark)" srcset="https://cherry.cyberguy.fyi/65f6436830e4ea468d6065b0dd0915455863cdec6b56255e069aaaf8e28bf77d.svg"> <source media="(max-width: 600px)" srcset="https://cherry.cyberguy.fyi/f0db874d585a979f2ab064c4fbfcd62638af3e67a4232d2fee5d8b8c71b99f68.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://cherry.cyberguy.fyi/5833e80144f95373d4d9ec7eda06ecef548bae0d82f03fe61e2d7105700a323c.svg"> <img alt="Three review steps: index compact offsets in pull-request-diff.ts; replace the active body in diff-view.ts; reveal review and navigation fragment targets before scrolling in review-view.ts and navigation.ts. Grouped added and removed line counts are shown." src="https://cherry.cyberguy.fyi/a12bfeb0a0a328f8a55643e785e862042cb0027155658dcd8bba55bf9f9dd26e.svg" width="880"> </picture> Source proposal previews and edit history share this reader. Reopening a file restores its selected page. > [!WARNING] > Browser Find and copying now cover the mounted page, not the whole diff. Use page controls for other lines. <details> <summary><b>Where the counts and timings come from</b></summary> Compared pinned master `eff61923bcf27bd26f1218c21268c927455de237` with the signed branch in Chromium at 1440 × 1000. Each case has seven measured runs after one excluded warmup. The fixture mounts the production `mountPatches` surface with real signed patch events, the production parser, review cards, and application styles. The single-file case selects a 10,000-addition patch. The four-file case combines four 5,000-addition patches. Timings include mounting, patch processing, DOM insertion, and forced body layout. Fixture signing and setup happen before the timer. This is a mounted app component benchmark, not a full-shell navigation, Git transfer, or relay latency measurement. All 50 pages of the single-file case exposed 10,000 distinct line anchors while keeping at most 200 source rows mounted. Page replacement had a 9.8 ms median and 66.6 ms maximum across 49 transitions. These timings are local observations, not a cross-device guarantee. Chromium checks also exercised initial old/new deep hashes, old/new review links to line 9999, post-mount fragments, browser back/forward across pages and files, excerpts, file filtering, the phone file menu, collapse/reopen, restored page numbers, proposal preview markup, and real edit-history cards. The phone check used a 390-pixel viewport. Proposal preview checks used the production diff markup inside a form, not a live Git resolution or publication. Four page regressions cover hunk seams, insertion/deletion coordinates, no-newline notes at a page boundary, every line of a large file, and full-data review excerpts. A fifth regression runs the production napplet fragment dispatcher in real Chromium, including browser history restoration. It requires Chromium and ran here. </details>
↑