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
This commit is contained in:
2026-10-15 17:19:47 +00:00
parent d870679f36
commit 275f925549
+4 -5
View File
@@ -20,11 +20,10 @@ import (
var vipsOnce sync.Once var vipsOnce sync.Once
// initVips initializes libvips with quiet logging, one worker thread per // initVips initializes libvips with quiet logging, one worker thread per
// image and no operation cache. With one thread each, the images processed // image and no operation cache. Each request decodes different source
// at once use no more CPUs than MaxConcurrentProcessing. Each request // bytes, so the operation cache would rarely be hit and would hold memory
// decodes different source bytes, so the operation cache would rarely be // outside MaxConcurrentProcessing; repeated requests are served from
// hit and would hold memory outside MaxConcurrentProcessing; repeated // pixa's disk cache instead.
// requests are served from pixa's disk cache instead.
func initVips() { func initVips() {
vipsOnce.Do(func() { vipsOnce.Do(func() {
vips.LoggingSettings(nil, vips.LogLevelError) vips.LoggingSettings(nil, vips.LogLevelError)