mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
perf(main): buffer MPV OSD log writes asynchronously
Move OSD log appends off sync fs calls to reduce main-process blocking under frequent OSD activity. Add buffered flush wiring into quit cleanup so pending log lines are drained best-effort during shutdown.
This commit is contained in:
@@ -29,6 +29,7 @@ export function createBuildOnWillQuitCleanupDepsHandler(deps: {
|
||||
clearYomitanParserState: () => void;
|
||||
|
||||
getWindowTracker: () => Stoppable | null;
|
||||
flushMpvLog: () => void;
|
||||
getMpvSocket: () => SocketLike | null;
|
||||
getReconnectTimer: () => TimerLike | null;
|
||||
clearReconnectTimerRef: () => void;
|
||||
@@ -63,6 +64,7 @@ export function createBuildOnWillQuitCleanupDepsHandler(deps: {
|
||||
const tracker = deps.getWindowTracker();
|
||||
tracker?.stop();
|
||||
},
|
||||
flushMpvLog: () => deps.flushMpvLog(),
|
||||
destroyMpvSocket: () => {
|
||||
const socket = deps.getMpvSocket();
|
||||
socket?.destroy();
|
||||
|
||||
Reference in New Issue
Block a user