Avoid synchronous activity bar size measurement - #335537
Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits intoSep 12, 2026
Merged
Conversation
Compute global activity height from rendered actions and the existing CSS sizing inputs instead of reading clientHeight during layout. Recalculate overflow when Accounts visibility changes and cover compact, Modern UI, and horizontal layouts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
September 10, 2026 19:28
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation matches its stated performance goal and includes focused regression coverage.
Review tier: Balanced
Findings: None
What changed in this PR
Replaces startup DOM measurement with deterministic activity-bar sizing while preserving existing layouts and interactions.
Changes:
- Calculates global action height from action count, height, and gap.
- Relayouts when Accounts visibility changes.
- Adds coverage across activity-bar modes and orientations.
| File | Description |
|---|---|
globalCompositeBar.ts |
Adds calculated height and change events. |
activitybarPart.ts |
Uses calculated global-action sizing. |
sidebarPart.ts |
Adapts to the revised constructor contract. |
globalCompositeBar.test.ts |
Tests sizing and visibility idempotence. |
activitybarPart.test.ts |
Tests layout modes without DOM measurement. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Dmitriy Vasyura (dmitrivMS)
marked this pull request as ready for review
September 12, 2026 07:30
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
September 12, 2026 07:30
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
|
Dirk Bäumer (dbaeumer)
approved these changes
Sep 12, 2026
TylerLeonhardt
approved these changes
Sep 12, 2026
Dmitriy Vasyura (dmitrivMS)
deleted the
agents/vscode-insiders-startup-profiling
branch
September 12, 2026 17:05
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.
Remove the vertical activity bar's synchronous global-action-container
clientHeightread during startup layout.This follows the remaining activity-bar layout cost observed after the titlebar fix in #334751.
Performance validation
Compared baseline and candidate on the same complete Code OSS development build at
333552ca38d5e15c8b734157159fcfcae9553c87, using separate warmed profiles and alternating order. Baseline modules were compiled from HEAD using the repository's normal compiler; only the three affected generated modules were exchanged.Five measured untraced launches and three measured traced launches per variant, after warmups:
didStartWorkbenchForced layout decreases by approximately 44.4% (11.9 ms) rather than merely disappearing from the original function's profile. A remaining flush occurs during focus handling.