Repository navigation
Commit 206366f
authored
perf: skip a notebook-wide restyle when opening the command palette (#12257)
## 📝 Summary
Opening the command palette on a page with no scrollbar gap made Chrome
recalculate styles across the notebook. Set
`--removed-body-scroll-bar-size` to `0px` in 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](https://linear.app/marimo/issue/MO-8797/fix-find-dialogs-scroll-outline-and-remaining-per-event-helpers).1 parent e2d7d65 commit 206366f
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| |||
0 commit comments