How GitHub renders a 2,200-file, 1M-line pull request without jank
GitHub Blog AI/ML · rss · 2026-09-24
GitHub's engineering blog details rebuilding the pull request view in the Copilot app to handle extreme diffs, stress-tested on an open source PR with 2,200 files, over 1M changed lines, and 400+ inline comments.
Key takeaways:
- Pure code diffs rely on an "all heights known before paint" contract: imperative recycled row renderers, typed-array geometry, and backend-streamed diff documents keep per-frame work constant.
- Comments break that contract — their height depends on markdown wrapping, expandable blocks, reply composers, and image loading, so estimators fail at the extremes and post-paint corrections cause scroll jumps.
- The fix splits geometry in two: exact deterministic code height plus a separate dynamic-block index keyed by identity, with fingerprints and width-bucketed cached measurements.
- Their first design (one ResizeObserver per block) was rejected as a self-retriggering feedback loop; the shipped solution is a single idle/scroll-gated measurement pass scoped to 2400px around the viewport, batch-reading mounted blocks in one reflow.
More from coding & agent
- Anthropic made claude.ai 3x faster in two weeks — and shares how, prompts included — bcherny · 2026-09-24
- Walkthrough: Blender MCP plus FLORA for precise product turntable animations — round · 2026-09-24
- New video series on agent evals kicks off with episode 1: how to read traces — doesdatmaksense · 2026-09-24
- Open-source agent lead-enrichment stack Jev+Treg undercuts Clay at $0.029 per verified lead — cneuralnetwork · 2026-09-24
- uv author: metadata-free lockfiles still detect stale resolutions — charliermarsh · 2026-09-24
- Running Claude vs Codex debates in a shared doc works, but it's slow and expensive — kshitizsriv · 2026-09-24