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 all: gofmt -w -r 'interface{} -> any' . 2022-03-17 22:03:27 +01:00
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 resources/images: Require width and height for Crop, Fill, and Fit 2022-03-20 19:44:41 +01:00
filters.go all: gofmt -w -r 'interface{} -> any' . 2022-03-17 22:03:27 +01:00
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 images: Add images.Overlay filter 2020-12-17 09:14:18 +01:00
resampling.go Add a set of image filters 2019-08-28 15:59:54 +02:00
smartcrop.go resources/image: Fix fill with smartcrop sometimes returning 0 bytes images 2021-06-17 23:52:27 +02:00
text.go Add custom font support to images.Text 2021-12-07 16:53:02 +01:00