list: batch dynamic height measurements - #330967
Merged
Connor Peet (connor4312) merged 4 commits intoAug 18, 2026
Merged
Conversation
Improves dynamic-height list rendering by batching DOM writes and reads and by reusing measured rows that enter the final render range. - Groups height preparation, measurement, and publication into separate phases. - Promotes compatible measured rows instead of rendering the same element twice. - Releases unpromoted rows when rendering fails or the final range changes. - Validates row identity before promotion after reentrant list updates. - Adds tests for batching, row reuse, error cleanup, and reentrant splices. - Reduces median conversation-switch latency by 31.1% for a small chat and 31.6% for a large chat across repeated alternating swaps. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Optimizes dynamic-height list rendering by batching measurements and reusing measured rows.
Changes:
- Separates DOM preparation, measurement, and publication phases.
- Promotes compatible measured rows and cleans up retained rows safely.
- Adds batching, cleanup, and reentrancy tests.
Show a summary per file
| File | Description |
|---|---|
src/vs/base/browser/ui/list/listView.ts |
Implements batched measurement and row promotion. |
src/vs/base/test/browser/ui/list/listView.test.ts |
Adds dynamic-height regression tests. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Balanced
roblourens
previously approved these changes
Aug 14, 2026
Restart batched height measurement when renderer callbacks mutate the list, and cover multi-row batching and remove-all reentrancy.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Connor Peet (connor4312)
marked this pull request as ready for review
August 17, 2026 22:50
Connor Peet (connor4312)
enabled auto-merge (squash)
August 17, 2026 22:50
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
|
Keep surviving delegated measurements synchronized with the range map and prevent stale tree render cleanup from removing newer node mappings.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Don Jayamanne (DonJayamanne)
previously approved these changes
Aug 18, 2026
Return null for unmeasured delegated heights to satisfy the virtual delegate contract in CI type checking.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Martin Aeschlimann (aeschli)
approved these changes
Aug 18, 2026
Connor Peet (connor4312)
deleted the
connor4312/batch-list-dynamic-heights
branch
August 18, 2026 08:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves dynamic-height list rendering by batching DOM writes and reads and by
reusing measured rows that enter the final render range.
Performance
Measured with DevTools traces while repeatedly alternating between the same small
and large chats. The samples form two non-overlapping modes. The baseline capture
contains 9 small-chat and 10 large-chat swaps; the after capture contains 11
small-chat and 12 large-chat swaps.
Overall interaction
The interquartile ranges do not overlap:
Small-chat pipeline
setModelonDidChangeItemssetChildrenLarge-chat pipeline
setModelonDidChangeItemssetChildrenRendering and layout
Validation
npm run eslint -- src/vs/base/browser/ui/list/listView.ts src/vs/base/test/browser/ui/list/listView.test.tsnpm run typecheck-client(Commit message generated by Copilot)