Skip to content

perf(macos): reduce audio and prefetch UI stalls - #54

Merged
tcconnally merged 1 commit into
mainfrom
fix/macos-playback-soak
Jul 26, 2026
Merged

perf(macos): reduce audio and prefetch UI stalls#54
tcconnally merged 1 commit into
mainfrom
fix/macos-playback-soak

Conversation

@tcconnally

Copy link
Copy Markdown
Owner

Summary

  • Replace synchronous libmpv time-pos IPC during lazy audio relock with the existing event-thread-maintained position cache.
  • Defer loadfile append prefetch one Qt event-loop turn, keeping next/advance handlers short while preserving the playlist warmup path.
  • Add explicit audio-arm timings plus a macOS audio-focused soak launcher/JSONL telemetry artifacts.

Evidence

The M5 five-minute soak recorded a 210 ms cell._toggle_mute stall and repeated 170–246 ms wall._arm_prefetch / wall.next_video GUI stalls. VideoToolbox remained active on every cell; cache starvation is separately visible and remains out of scope for this targeted UI-latency change.

Validation

  • python3 tests/run_all.py — PASS
  • bash -n soak_wall.sh — PASS
  • New regression contracts cover cached audio relock and deferred prefetch scheduling.

Rerun

Run ./soak_wall.sh 5 on the M5. Compare AUDIO arm, PERF slow slot, PERF loop stall, and freeze counters to the baseline.

@tcconnally
tcconnally merged commit 559721a into main Jul 26, 2026
2 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