Skip to content

Commit 5f46da6

Browse files
jmooringbep
andauthored
internal/warpc: Increase WebP memory limit to 256 MiB
Closes #14282 --------- Co-authored-by: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
1 parent fe64a68 commit 5f46da6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎hugolib/site.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ func NewHugoSites(cfg deps.DepsCfg) (*HugoSites, error) {
265265
// WebP options.
266266
warpc.Options{
267267
CompilationCacheDir: compilationCacheDir,
268-
PoolSize: 2,
268+
PoolSize: 1,
269+
Memory: 256, // 256 MiB (4096 MiB Max)
269270
Infof: logger.InfoCommand("webp").Logf,
270271
Warnf: logger.WarnCommand("webp").Logf,
271272
},

‎internal/warpc/warpc.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,7 @@ func newDispatcher[Q, R any](opts Options) (*dispatcherPool[Q, R], error) {
575575
}
576576

577577
if opts.Memory <= 0 {
578-
// 32 MiB
579-
opts.Memory = 32
578+
opts.Memory = 32 // 32 MiB
580579
}
581580

582581
ctx := opts.Ctx

0 commit comments

Comments
 (0)