hugo/resources/images
Bjørn Erik Pedersen 4ef9baf5bd Only invoke a given cached partial once
Note that this is backed by a LRU cache (which we soon shall see more usage of), so if you're a heavy user of cached partials it may be evicted and
refreshed if needed. But in most cases every partial is only invoked once.

This commit also adds a timeout (the global `timeout` config option) to make infinite recursion in partials
easier to reason about.

```
name              old time/op    new time/op    delta
IncludeCached-10    8.92ms ± 0%    8.48ms ± 1%   -4.87%  (p=0.016 n=4+5)

name              old alloc/op   new alloc/op   delta
IncludeCached-10    6.65MB ± 0%    5.17MB ± 0%  -22.32%  (p=0.002 n=6+6)

name              old allocs/op  new allocs/op  delta
IncludeCached-10      117k ± 0%       71k ± 0%  -39.44%  (p=0.002 n=6+6)
```

Closes #4086
Updates #9588
2023-01-25 17:35:23 +01:00
..
exif Misc doc, code refactoring to improve documentation 2023-01-04 18:01:26 +01:00
webp
color.go resources/images: Add $image.Colors 2022-09-22 15:57:35 +02:00
color_test.go resources/images: Add $image.Colors 2022-09-22 15:57:35 +02:00
config.go Only invoke a given cached partial once 2023-01-25 17:35:23 +01:00
config_test.go
filters.go
filters_test.go Only invoke a given cached partial once 2023-01-25 17:35:23 +01:00
image.go resources/images: Fix 2 animated GIF resize issues 2022-10-04 15:38:12 +02:00
image_resource.go Misc doc, code refactoring to improve documentation 2023-01-04 18:01:26 +01:00
overlay.go
resampling.go
smartcrop.go
text.go