---
title: "Rendering huge pull requests in the GitHub Copilot app"
description: "The GitHub Copilot app's pull request view stays responsive on a 2,200-file, million-line diff with 400+ review comments by splitting document height into two geometries: exact, precomputed prefix-summed code rows and lazily measured dynamic blocks for comments, drafts and composers."
url: "https://swe.quest/articles/rendering-huge-pull-requests-in-the-github-copilot-app-dfdd1afcfdc347d9"
canonical: "https://github.blog/engineering/user-experience/rendering-huge-pull-requests-in-the-github-copilot-app/"
source: "GitHub Engineering"
published: "2026-09-23"
difficulty: "medium"
kind: "Case study"
reading_minutes: 13
tags: ["frontend","web-performance","performance","testing","observability"]
---

# Rendering huge pull requests in the GitHub Copilot app

A post on [GitHub Engineering](https://swe.quest/sources/github.md), published 2026-09-23, 13 min read, Case study. Original: [https://github.blog/engineering/user-experience/rendering-huge-pull-requests-in-the-github-copilot-app/](https://github.blog/engineering/user-experience/rendering-huge-pull-requests-in-the-github-copilot-app/)

## Summary

The GitHub Copilot app's pull request view stays responsive on a 2,200-file, million-line diff with 400+ review comments by splitting document height into two geometries: exact, precomputed prefix-summed code rows and lazily measured dynamic blocks for comments, drafts and composers. A single idle- and scroll-gated measurement pass scoped to about 2400px around the viewport replaces per-block ResizeObserver write-back, which caused feedback loops. Observers only flag blocks for re-measurement, except for user-caused resizes, which commit synchronously at most once per frame. Identity-based scroll anchoring keeps corrections small, and a cache of recent diffs prevents an instantly drawn shell from sitting around an empty diff. Bugs were found with permanent in-app probes asserted as CI budgets and an autonomous headless change→measure→improve loop.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Web performance](https://swe.quest/tags/web-performance.md) (Web & mobile)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)

## Prerequisites

- DOM list virtualization ([easy posts on Virtualization](https://swe.quest/tags/virtualization.md?difficulty=easy))
- browser layout and reflow
- ResizeObserver
- React rendering ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))

## Keywords

GitHub Copilot app, ResizeObserver, virtualization, scroll anchoring, requestAnimationFrame

## Related posts

- [Crafting a better, faster code view](https://swe.quest/articles/crafting-a-better-faster-code-view-4c1560c4b1796bf2.md): GitHub Engineering · 2023-06-21 · Medium · 13 min read · Web performance, React, Frontend, Accessibility, Browsers
  GitHub's new React-based code view renders an 18,000-line file in under a second instead of nearly 27 seconds.
- [The uphill climb of making diff lines performant](https://swe.quest/articles/the-uphill-climb-of-making-diff-lines-performant-3c1abf458c8d7ced.md): GitHub Engineering · 2026-04-03 · Medium · 10 min read · Web performance, React, Frontend, Performance engineering
  GitHub rebuilt the React diff-line components in the pull request Files changed tab after large PRs pushed the JavaScript heap past 1 GB, DOM counts above 400,000 and INP to unusable levels.
- [How GitHub Actions renders large-scale logs](https://swe.quest/articles/how-github-actions-renders-large-scale-logs-b2578d67d9b7f62e.md): GitHub Engineering · 2021-03-25 · Medium · 6 min read · Frontend, Web performance, JavaScript, Browsers
  GitHub Actions replaced a third-party virtualization library with a custom one to render job logs of up to 50k lines smoothly, including on mobile.
- [From latency to instant: Modernizing GitHub Issues navigation performance](https://swe.quest/articles/from-latency-to-instant-modernizing-github-issues-navigation-performance-d76fe4f2daa6064a.md): GitHub Engineering · 2026-05-14 · Medium · 13 min read · Web performance, Caching, Frontend, Local-first & sync, Browsers
  GitHub made Issues navigation feel instant by moving to a local-first, stale-while-revalidate model: render issue pages from client-side data first, then revalidate in the background.
- [Rendering Engine Tales: Road to Concurrent React](https://swe.quest/articles/rendering-engine-tales-road-to-concurrent-react-735d8093c1f69c78.md): Zalando Engineering · 2023-07-10 · Medium · 16 min read · React, Frontend, Web performance, Debugging
  Zalando migrated its Rendering Engine framework, which renders the Fashion Store from backend-defined Entity trees mapped to React Renderers, to React 18 concurrent rendering.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
