Repository navigation
fix(asr): give back about 5 GB an idle app held for dictation - #419
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
akou kept several GB of memory long after the last dictation or call. #419 fixed that on main. This release ships it to the desktop app, along with the dependency bumps and the nightly fix merged since 1.2.0. ## What 1.2.1 carries - #419: Qwen's dictation server stops after 10 idle minutes, and the streaming model is no longer reloaded right after an idle release. Together that is about 5 GB back while the app sits idle. - #418: the nightly stops downloading an AMI meeting from the Edinburgh mirror every night. - #412, #413, #414, #415, #416: parakeet-rs 0.4.0, wasapi 0.26.0, serde_json 1.0.154, transcribe-cpp 0.4.0, zod 4.6.7, Playwright 1.64, and the upload/download-artifact bumps. ## The release itself - `bun scripts/stamp-version.ts --set 1.2.1`: 11 places say 1.2.1. The README's DMG name, the docs' image tags and the Mac server clone tag say 1.2.1. - CHANGELOG.md has the 1.2.1 section. - docs/providers.md: the vendor terms were read again on 2026-10-18, as CI-28 requires after the 1.2.0 tag of 2026-10-14. No term changed. One Codex documentation change: `--full-auto` is no longer supported. akou never passed it, so nothing changes. No default changes. ## Checks - `bun scripts/stamp-version.ts --check`: 11 places say 1.2.1. - `bun test tests/release-evidence.test.ts`: 10 pass. With the new terms row removed, `termsProblems` reports the reading dated 2026-10-13, which is before 1.2.0. With the row back, it reports nothing. - The 8-hour soak of the release checklist ran on the reference Mac from 18:10Z on 2026-10-18 to 02:10Z on 2026-10-19, at real time, with a burner on every core and this branch's own `akou-capture` 1.2.1 in file mode: 0 holes, heap growth 0.016 MB, RSS growth -5.3 MB, event loop late by at most 135 ms, 0 unreadable log lines, 9 of 9 checks ok. The JSON is committed as docs/gates/soak-1.2.1.json. The helper ran from a copy outside the shared cargo target folder, so no other build on the box could replace it mid-soak. - After the merge: tag `v1.2.1` on the merge commit, then `release.yml` builds the signed app, the images and the update feed.
akou kept using several GB of RAM long after the last dictation or call. Nothing leaked. Two models stayed loaded on purpose so the next dictation would start fast, and neither was ever let go:
llama-serverforbestdictation, about 3 GB.asr.qwenIdleMinutesdefaulted to 0, which means never stop. On the reference Mac the log shows two of these servers up for 18 h and 13 h, each until the app quit.asr.modelIdleMinutes(5) the live Worker let go of its models, andonReleaseloaded the dictation's model straight back. A warm-up was not a use, so the reload started no idle time, and the model then stayed until the next call or dictation. The same held for the warm-up at launch and after a call.The fix:
asr.qwenIdleMinutesdefaults to 10.touch()ondwarmed), so what it loaded goes after the idle time like anything else.onReleaseno longer reloads anything. Each model loads at its next use.asr.warmAtStartlets memory pressure free its models, and server mode keeps its streaming model ready for the first session. Both passuse: false, as before.The cost: after an idle stretch, the first dictation waits for its model, about 1 to 2 s for the streaming model, and a few seconds for Qwen's server under
best. This undoes the reload that #322 added to keep that first press instant.Tests: a new case in
tests/asr-live.test.tswarms dictation with no use and checks that the models go after 5 minutes and stay gone for an hour. With thetouch()removed, exactly that test fails. The existingasr.warmAtStarttest caught the first version of this change freeing that setting's models, which is why the warm-up has theuseflag. DC-E2 and DC-E7 in DICTATION.md and the settings page doc now describe the new defaults.Not measured here: whether macOS gets back every page sherpa frees.
tests/idle-memory.e2e.test.tsruns on the real models withfootprint, on the reference Mac only.Summary by CodeRabbit
Behavior Changes
Documentation