Render at 10fps so an idle viewer stops burning CPU - #29
Conversation
Bubble Tea's renderer wakes every frame and copies the whole screen to compare it, even when nothing changed. At the default 60fps an idle viewer used 19cs of CPU per 40s; at 10fps it uses 6cs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Solid. Three lines, one option, correctly scoped to the stated purpose — and it's the only right lever, since bubbletea v1 fixes the framerate at program construction and gives no focus/blur throttle hook. Correctness: no impact on any of the load-bearing invariants.
Two notes, neither blocking: a. The tradeoff you're buying is continuous-scroll smoothness. Held b. Description nit only, not the code: bubbletea's Leaving the picker's program at the default is right — it's short-lived and interactive, not the thing burning CPU. |
Bubble Tea's renderer wakes every frame and copies the full screen to compare it with the last render, even when nothing changed. The framerate is fixed at startup, so focus or blur events can't throttle it.
Idle CPU per viewer, measured over 40s:
At 10fps, a keypress repaints within 100ms at most.
🤖 Generated with Claude Code