Files
SubMiner/backlog/tasks/task-75 - Move-mpv-osd-log-writes-to-buffered-async-path.md

1.3 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies, priority
id title status assignee created_date updated_date labels dependencies priority
TASK-75 Move mpv OSD log writes to buffered async path To Do
2026-02-18 11:35 2026-02-18 11:35
logging
performance
main-process
low

Description

appendToMpvLog in src/main.ts uses synchronous fs operations on OSD writes. Frequent OSD activity can block the event loop and adds avoidable latency in main process runtime paths.

Action Steps

  1. Replace sync file writes with buffered async logger flow.
  2. Ensure log directory creation and write failures remain best-effort (non-fatal).
  3. Add flush behavior for shutdown to avoid dropping trailing log lines.
  4. Keep log format/path unchanged unless explicitly intended.
  5. Add tests for non-blocking behavior and graceful error handling.

Acceptance Criteria

  • #1 OSD log path no longer uses synchronous fs calls
  • #2 Logging remains best-effort and does not break runtime behavior on fs failure
  • #3 Shutdown flush behavior verified by tests

Definition of Done

  • #1 Core tests pass with new logging path
  • #2 No user-visible regression in MPV OSD/log output behavior