Ghost/ghost/image-transform/test
Daniel Lockyer eef85bba90 Disabled Sharp's internal cache to improve memory usage
refs https://sharp.pixelplumbing.com/api-utility#cache

- Sharp has a 50MB cache by default, used within libvips, to increase
  the performance of transforming images
- this isn't relevant to us because we should never be optimizing the
  same image as we check if the optimized image already exists
- I presume there is also some extra overhead of using the cache because
  the memory doesn't seem to grow by 50MB
- the memory usage comparison in Ghost is pretty drastic - uploading 10
  images in serial w/ jemalloc:
  - with cache (default) = peak of 480MB, settles down to 330MB
  - disabling cache = peak of 270MB, settles down to 161MB
- this commit disables the cache
- also adds stubbing for the function in tests
2021-11-05 11:59:39 +00:00
..
utils Updated paths & tests to work in new pkg structure 2020-03-25 14:48:41 +00:00
.eslintrc.js Remove trailing commas from .eslintrc.js files 2020-08-04 14:48:07 +01:00
transform.test.js Disabled Sharp's internal cache to improve memory usage 2021-11-05 11:59:39 +00:00