GitHub

Rendering huge pull requests in the GitHub Copilot app

Sep 23, 2026Alberto Gimeno
Rendering huge pull requests in the GitHub Copilot app
SummaryAI, from the source post

This post details significant optimizations for rendering extremely large pull requests in the GitHub Copilot app's pull request view. It addresses the challenges of rendering large diffs with numerous comments by introducing a dual-geometry approach: deterministic code geometry and dynamic block geometry. Key contributions include a scroll-gated measurement scheduler that prioritizes on-screen reads, off-screen measurement fallbacks, and the use of ResizeObservers that flag blocks for re-measurement rather than directly triggering layout updates. It also introduces scroll anchoring to correct viewport jumps without fighting user interaction and distinguishes between user-initiated scrolls and programmatic scrolls to prevent visual glitches. The core problem solved is maintaining a performant review experience for pull requests with thousands of files and millions of changed lines.

More from the Pull Request Files Changed Performance trail