You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
(style): #main :has() rules make each terminal switch force ~2 s of style recalc #541
Measured live on main a02f96c (isolated test instance, 5 terminals with 30,000 lines each):
Each tab switch was one ~2 s long animation frame, almost all of it style and layout (styleAndLayoutStart ≈ 1.9 s, no script attribution).
CPU profile: 2163 ms of self time in xterm's CharSizeService _measure. Stack: showSession → suspendTerminalWebgl → WebGL addon dispose → DOM renderer renderRows → 59 × createRow → _measure.
Every row forces a synchronous layout, and the :has() rules make each forced recalc cost 25–35 ms.
#532 hides most of it by keeping three warm WebGL contexts, but any path that still builds DOM rows under #main pays the cost: a cold terminal, a fourth terminal beyond the warm cap, the grid.
Fix: drive the two rules from a class toggled where #terminal-area display and #file-panel.open already change, e.g. #main.terminal-area-shown and #main.terminal-area-shown.file-panel-open, and drop :has() on #main. Keep the min-width behaviour #506 wanted.
Activity
(tool-bar): test that #main width rules follow classes, not :has()
(tool-bar): drive the main width floor from classes, not #main :has()
(tool-bar): drive the main width floor from classes, not #main :has() (…