From 63a4008ce40127b3b82143358786651a177110fa Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Fri, 3 Jul 2026 02:37:22 +0800 Subject: [PATCH] Avoid full cache invalidation in render worker after LUT processor is ready InvalidateAll() on the OCIO LUT node triggered the worker's PreviewAutoCacher to re-cache the entire timeline, causing the main process to freeze while waiting for frames. Only invalidate in the main GUI process so the viewer refreshes; the worker will naturally use the new processor on its next render request. --- app/node/color/ociolut/ociolut.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/node/color/ociolut/ociolut.cpp b/app/node/color/ociolut/ociolut.cpp index b9d778d73..7dbce7ca9 100644 --- a/app/node/color/ociolut/ociolut.cpp +++ b/app/node/color/ociolut/ociolut.cpp @@ -20,6 +20,7 @@ #include "ociolut.h" +#include #include #include @@ -207,8 +208,15 @@ void OCIOLutNode::SetProcessorResult(ColorProcessorPtr processor, last_processor_ = processor; set_processor(processor); - // The processor has changed, ensure any cached frames are re-rendered. - InvalidateAll(kTextureInput); + // The processor has changed. In the main GUI process we need to invalidate + // cached frames so the viewer refreshes automatically. In the render worker + // process, a full invalidation can trigger an expensive re-cache of the + // entire timeline, so we skip it; the next render request will naturally + // pick up the new processor. + if (QCoreApplication::applicationName() != + QStringLiteral("olive-render-worker")) { + InvalidateAll(kTextureInput); + } } OCIOLutNode::GenerateProcessorTask::GenerateProcessorTask(