From 2322b4dba98377ef6106084d936e6cf85753367a Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 15 Oct 2026 13:07:22 +0000 Subject: [PATCH] Claim only one libvips worker thread per image in initVips The comment said the images processed at once use no more CPUs than max_concurrent_processing, which the review found does not hold for GIF output. It now says only that libvips runs one worker thread per image. Model: opus-5-5 --- internal/imageprocessor/imageprocessor.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/imageprocessor/imageprocessor.go b/internal/imageprocessor/imageprocessor.go index b4be6d6..2a1fbf5 100644 --- a/internal/imageprocessor/imageprocessor.go +++ b/internal/imageprocessor/imageprocessor.go @@ -20,11 +20,10 @@ import ( var vipsOnce sync.Once // initVips initializes libvips with quiet logging, one worker thread per -// image and no operation cache. With one thread each, the images processed -// at once use no more CPUs than MaxConcurrentProcessing. Each request -// decodes different source bytes, so the operation cache would rarely be -// hit and would hold memory outside MaxConcurrentProcessing; repeated -// requests are served from pixa's disk cache instead. +// image and no operation cache. Each request decodes different source +// bytes, so the operation cache would rarely be hit and would hold memory +// outside MaxConcurrentProcessing; repeated requests are served from +// pixa's disk cache instead. func initVips() { vipsOnce.Do(func() { vips.LoggingSettings(nil, vips.LogLevelError)