Repository navigation
Switchboard 0.4.2: voice server memory and idle CPU fixes - #164
Merged
Merged
Conversation
- god-tts: cap MLX's buffer cache (128 MB, GOD_TTS_CACHE_MB) and clear it after every GPU job. The default cache grew to the whole GPU working set: an idle voice server held ~5.3 GB on an 8 GB M1; now ~0.6 GB. - The app refreshes an installed voice engine's server script from the bundle on launch (the engine is opt-in and only copied it once at install). - Menu-bar app idle CPU ~22% -> ~6%: stop animations nobody can see. The hidden panel's hero DotMatrix, 1 Hz shortcut tick and onboarding breathe now pause when the panel is off screen; the orb and loose creature only animate when visible; the team pulse only runs while a team is live; the god-status drop drops its hosting view when hidden; the 1.6 s status poll writes state and redraws the menu-bar glyph only on change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Measured on an 8 GB M1 (2026-10-02), then fixed.
Voice server (god-tts): MLX's buffer cache defaulted to the whole GPU working set (~5.7 GB), so an idle voice server kept ~5.3 GB of freed buffers and pushed the machine into heavy swap. The cache is now capped at 128 MB (
GOD_TTS_CACHE_MB) and cleared after every GPU job. Idle footprint: 5,295 MB to ~590 MB, stable across synths and keep-warm passes. Because the engine is opt-in and the installer copies the server only once, the app now refreshes an installed engine's server script from the bundle on launch and restartscom.relay.godtts. It never installs the engine where it is absent.Menu-bar app idle CPU: 22-23% to 6.0-6.5% (
toppower 22 to 6). The cause was animations running where nobody could see them:DotMatrixre-laid-out the whole panel at 24 fps (about 23% of main-thread samples); it is now gated onpanelVisiblepanelVisible@Publishedstate and redraws the glyph only on changeBuilt with package-dmg.sh: signed Developer ID, app and DMG notarized and stapled,
spctlaccepted.🤖 Generated with Claude Code