Commit Graph
2 Commits
Author SHA1 Message Date
sudacode 935cc1a20f perf(subsync): run alignment in a worker thread
Alignment and candidate scoring take up to ~1s per call on long media and an
auto run makes several, which stalled mpv IPC and the overlay on the main
process. They now run in a reusable worker (src/subsync/align-worker.ts) that
idles out after 30s and falls back to the main thread if it cannot start.
Aborting a run terminates the worker, so cancellation no longer waits for an
in-flight alignment.
2026-11-28 03:30:32 -08:00
sudacode 241aab087f refactor(subsync): split the subsync service into focused modules
subsync.ts (2.4k lines) becomes a small facade over subsync-context (mpv state
and session checks), subsync-files (extract, write, reload), subsync-candidates
(reference discovery and audio), subsync-manual, subsync-auto, and
subsync-shared (deps, thresholds, formatting). Code moved verbatim; public
exports are unchanged.
2026-11-28 03:25:32 -08:00