Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-02-13 23:45:51 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-02-14 22:59:02 +0300
commit58382e9572559f88ed57f5c4899a37d489bcb220 (patch)
tree84a2616485e240f2cf5261e60d79a1bf45ae2b16 /.circleci
parent53dac9a5067dfd84283a2b2d837738a63b63b596 (diff)
resource: Fix multi-threaded image processing issue
When doing something like this with the same image from a partial used in, say, both the home page and the single page: ```bash {{ with $img }} {{ $big := .Fill "1024x512 top" }} {{ $small := $big.Resize "512x" }} {{ end }} ``` There would be timing issues making Hugo in some cases try to process the same image with the same instructions in parallel. You would experience errors of type: ```bash png: invalid format: not enough pixel data ``` This commit works around that by adding a mutex per image. This should also improve the performance, sligthly, as it avoids duplicate work. The current workaround before this fix is to always operate on the original: ```bash {{ with $img }} {{ $big := .Fill "1024x512 top" }} {{ $small := .Fill "512x256 top" }} {{ end }} ``` Fixes #4404
Diffstat (limited to '.circleci')
0 files changed, 0 insertions, 0 deletions