From eecc4501bc525560b152bf83fe26fffe44425af3 Mon Sep 17 00:00:00 2001 From: locpham Date: Sat, 22 Aug 2026 02:05:49 +0000 Subject: [PATCH] perf(scan): timeout/module 30s->12s (Ozone treo vinh vien), subprocess 600->180s --- app/core/vst_engine.py | 2 +- native_bridge/src/RenderFxJob.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/core/vst_engine.py b/app/core/vst_engine.py index 0846c67..ffa36f5 100644 --- a/app/core/vst_engine.py +++ b/app/core/vst_engine.py @@ -512,7 +512,7 @@ class PluginManager: for d in dirs: try: r = subprocess.run([exe, "--scan", d], capture_output=True, - text=True, timeout=600) + text=True, timeout=180) except Exception: continue if r.returncode != 0: diff --git a/native_bridge/src/RenderFxJob.cpp b/native_bridge/src/RenderFxJob.cpp index 325eb5a..cc6e4a0 100644 --- a/native_bridge/src/RenderFxJob.cpp +++ b/native_bridge/src/RenderFxJob.cpp @@ -1506,12 +1506,12 @@ bool safeScanModule(const std::string& path, std::vector& out) { ScanCtx ctx{&path, &out}; HANDLE hThread = CreateThread(nullptr, 0, scanWorker, &ctx, 0, nullptr); if (!hThread) { std::cerr << "[Scan] skip (thread fail): " << path << std::endl; return false; } - const DWORD timeoutMs = 30000; // 30s/module — generous for big VST3s + const DWORD timeoutMs = 12000; // 12s/module — Ozone treo vĩnh viễn, đủ phân biệt DWORD wait = WaitForSingleObject(hThread, timeoutMs); if (wait == WAIT_TIMEOUT) { TerminateThread(hThread, 0); CloseHandle(hThread); - std::cerr << "[Scan] skip (timeout 30s): " << path << std::endl; + std::cerr << "[Scan] skip (timeout 12s): " << path << std::endl; return false; } CloseHandle(hThread);