OFICIAL GitHub Blog

Rendering huge pull requests in the GitHub Copilot app

What happened
Based on GitHub Blog · Sep 23, 2026

GitHub rebuilt the pull request diff view in its Copilot app to handle massive changes with over a million lines and hundreds of comments without slowing down.

Rendering huge pull requests in the GitHub Copilot app
GitHub Blog — GitHub
Key points
·
GitHub Copilot app’s diff view now handles pull requests with over a million changed lines and hundreds of comments without performance loss.
·
Code rows use precomputed heights for fast rendering, while comments rely on lazy, identity-based corrections to prevent scroll jumps.
·
Dynamic blocks for comments are anchored to file and line positions, using stable keys and fingerprinting to avoid full document rebuilds.
Key numbers
·
The GitHub Copilot app’s new diff surface was redesigned to keep the review experience fast even when handling extreme cases, such as a pull request with 2,200 files, over a million changed lines, and more than 400 inline review comments.

Broad refactors often require single large pull requests that become unwieldy as review comments accumulate. The GitHub Copilot app’s new diff surface was redesigned to keep the review experience fast even when handling extreme cases, such as a pull request with 2,200 files, over a million changed lines, and more than 400 inline review comments.

Rendering large diffs quickly relies on virtualization—only mounting visible rows and recycling DOM elements as users scroll. For code-only diffs, row heights are predictable because each row corresponds to a line of code with a fixed font size, allowing the entire height table to be computed upfront without performance penalties.

Review comments introduce unpredictability because their heights depend on dynamic factors like markdown wrapping, expandable sections, and loaded images, which cannot be known before rendering. Fixed-height slots or post-paint corrections lead to scroll jumps or whitespace gaps, especially in large pull requests.

To solve this, the team split the document’s geometry into two domains: a deterministic code geometry for predictable rows and a dynamic block geometry for unpredictable content like comments. Each dynamic block is anchored to a file and line, uses a stable key, and measures heights lazily to avoid layout disruptions.

Original source → Deals on Clipraptor.com →