Skip to content

Performance degradation in Diff Editor due to forced reflows during scrolling #312596

@g122622

Description

@g122622

Issue: Performance degradation in Diff Editor due to forced reflows during scrolling

Does this issue occur when all extensions are disabled?

Yes

VS Code Version

Version: 1.116.0 (system setup)
Commit: 560a9db
Date: 2026-04-15T00:28:13Z
Electron: 39.8.7
ElectronBuildId: 13797146
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Steps to Reproduce

  1. Open a large file with many diff changes in the Diff Editor (e.g., compare two versions of a file with 50+ changes)
  2. Scroll up and down repeatedly in the Diff Editor
  3. Observe that scrolling is smooth initially
  4. Continue using VS Code for an extended period (30+ minutes) with your commonly used extensions on
  5. Notice that scrolling in the Diff Editor becomes increasingly laggy

Description

Image

The Diff Editor's gutter toolbar (DiffToolBar) causes significant performance degradation during scrolling due to synchronous layout reads that trigger forced reflows. This issue accumulates over time as context keys change frequently, triggering menu updates that exacerbate the problem.

Metadata

Metadata

Assignees

Labels

staleIssues that have not been triaged in an appropriate amount of timetriage-needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions