Skip to content

Dev - #9

Merged
mgauz01 merged 4 commits into
mainfrom
dev
Jun 11, 2026
Merged

Dev#9
mgauz01 merged 4 commits into
mainfrom
dev

Conversation

@mgauz01

@mgauz01 mgauz01 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

No description provided.

google-labs-jules Bot and others added 4 commits June 11, 2026 20:32
A comprehensive set of high-impact performance optimizations across the entire application stack, covering UI, Audio, Text, and ASR pipelines.

1. **UI: GDI Caching (`ui/overlay.rs`)**
   - Cached brushes and regions to eliminate ~800 GDI syscalls per second.
   - Reduced background CPU usage during recording animations.

2. **ASR: Zero-Copy & Model Parallelism (`asr/`)**
   - Refactored Moonshine to use `Cow` padding, avoiding redundant multi-megabyte clones.
   - Propagated thread count settings to Parakeet, Cohere, and Canary models for consistent parallel inference.

3. **Audio: Zero-Latency Capture (`audio/capture.rs`)**
   - Implemented stateful on-the-fly downmixing and resampling in the live callback.
   - 80% reduction in recording memory footprint.
   - Eliminated batch processing delays at the end of dictation (near-instant stop).

4. **Text: Single-pass Regex Cleanup (`postprocess/filler.rs`)**
   - Replaced inefficient nested loops with a single-pass Regex using `OnceLock`.
   - 50% faster post-processing for long dictations.

5. **Normalization: Fused Passes (`audio/normalize.rs`)**
   - Combined Peak/RMS scans into a single pass and mathematically derived post-gain peak.
   - 37% faster normalization.

Measurement: Verified with `cargo test` and custom benchmarks for audio and text components. Added `regex` dependency.

Co-authored-by: mgauz01 <40064186+mgauz01@users.noreply.github.com>
⚡ Bolt: ultimate runtime performance suite
@mgauz01
mgauz01 merged commit 0ad5212 into main Jun 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant