Repository navigation
perf: skip a notebook-wide restyle when opening the command palette - #12257
Merged
Merged
Conversation
Give the body the same zero gap that the scroll lock applies when the page has no scrollbar. Keeping the rule inline avoids a full style update in Chromium. A nonzero scrollbar gap still takes precedence.
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Contributor
Coverage Report for ./frontend
File CoverageNo changed files found. |
kirangadhave
marked this pull request as ready for review
December 3, 2026 01:52
kirangadhave
requested review from
mscolnick
and
a balanced review from Copilot
December 3, 2026 01:53
kirangadhave
enabled auto-merge (squash)
December 3, 2026 01:53
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the inline scrollbar-gap default change.
No open issues 🎉
What changed in this PR
Reduces command-palette opening overhead by avoiding a notebook-wide style recalculation when there is no scrollbar gap.
Changes:
- Initializes
--removed-body-scroll-bar-sizeto0pxin an inline body style in the editor HTML.
| File | Description |
|---|---|
| frontend/index.html | Adds the inline scrollbar-gap default to avoid unnecessary restyling. |
Review effort: Balanced
mscolnick
approved these changes
Dec 3, 2026
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.
📝 Summary
Opening the command palette on a page with no scrollbar gap made Chrome recalculate styles across the notebook. Set
--removed-body-scroll-bar-sizeto0pxin the editor HTML so the scroll lock keeps the same inherited value. The same rule in the external stylesheet still triggered the restyle in production.In eight paired headless Chromium runs on a settled 500-cell notebook with two mounted editors, this skipped a style update across 34,165 elements. Median time from Mod-K to the first visible-frame marker fell from 225 ms to 134 ms. Every pair improved by 83–98 ms. Keyboard Shortcuts kept one wide style update and showed no consistent speedup.
Verified keyboard navigation, focus restoration, accessibility-tree exclusion, nested dialogs, background pointer and wheel blocking, and compensation for a 15 px scrollbar.
Related to MO-8797.