Problem
Switchboard consumes ~53% CPU with just 2 idle terminals (at shell prompt, no output). This causes noticeable heat and battery drain on laptops.
Root Causes
1. Cursor blink (fixed in PR #36)
cursorBlink: true in xterm options forces a WebGL repaint cycle every ~500ms per terminal. With multiple idle terminals, this keeps the GPU process and renderer constantly active.
2. Infinite CSS animations
Several sidebar/grid elements use animation: ... infinite which forces Chromium's compositor to run at 60fps even when nothing is visually changing:
.slug-group-dot.running — pulse-dot 2s ease-in-out infinite
.grid-card-dot.busy — pulse-dot 1.5s ease-in-out infinite
.session-item.needs-attention .session-status-dot::before/::after — ripple-out 2s ease-out infinite
.session-item.cli-busy .session-summary — shimmer-text 3s linear infinite
Each infinite animation costs ~5-10% CPU per visible animated element due to continuous composite passes.
Resolution
Replacing infinite animations with static visual equivalents (solid glow, static ring, static color) while keeping the transient spin-dot animation for cli-busy state:
| Element |
Before |
After |
| Running session dot |
Pulsing opacity |
Solid green + glow |
| Grid card busy dot |
Pulsing opacity |
Solid green + glow |
| Needs-attention dot |
Expanding ripple rings |
Static orange ring |
| CLI-busy summary text |
Shimmer gradient sweep |
Static blue color |
Results
| State |
Before |
After |
| 2 idle terminals |
~53% CPU |
~3% CPU |
| No terminals |
~1% |
~1% |
Tested on macOS M2 Max with Switchboard v0.0.28+.
PR #36 addresses cursor blink. The CSS animation fixes are available in navedr/switchboard@5727325 if you'd like to pull them in.
Problem
Switchboard consumes ~53% CPU with just 2 idle terminals (at shell prompt, no output). This causes noticeable heat and battery drain on laptops.
Root Causes
1. Cursor blink (fixed in PR #36)
cursorBlink: truein xterm options forces a WebGL repaint cycle every ~500ms per terminal. With multiple idle terminals, this keeps the GPU process and renderer constantly active.2. Infinite CSS animations
Several sidebar/grid elements use
animation: ... infinitewhich forces Chromium's compositor to run at 60fps even when nothing is visually changing:.slug-group-dot.running—pulse-dot 2s ease-in-out infinite.grid-card-dot.busy—pulse-dot 1.5s ease-in-out infinite.session-item.needs-attention .session-status-dot::before/::after—ripple-out 2s ease-out infinite.session-item.cli-busy .session-summary—shimmer-text 3s linear infiniteEach infinite animation costs ~5-10% CPU per visible animated element due to continuous composite passes.
Resolution
Replacing infinite animations with static visual equivalents (solid glow, static ring, static color) while keeping the transient
spin-dotanimation for cli-busy state:Results
Tested on macOS M2 Max with Switchboard v0.0.28+.
PR #36 addresses cursor blink. The CSS animation fixes are available in navedr/switchboard@5727325 if you'd like to pull them in.