-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
img-dim is slow and not cached #107
Comments
Did you see which part of img-dim is slow? I'm definitely supportive of caching it. I just have never seen it being slow. You definitely found a bug for the GIF special case, but otherwise the image processing is the slow part and obviously that is being done only once per build. |
|
OK. I'm definitely supportive of caching it. |
I'm having serious problems with the image processing scripts. |
Agree with @cozarkd . It has dramatically increased the build time and it is taking up so much memory that we cannot now use Netlify for building [so CI/CD is busted]. |
Did you try running |
oh, I thought that file was for remote images, makes sense now. In my use case I had to implement some features but not the full template. Problem solved, thanks |
Hello,
I realized that the img processing is executed multiple times per image - typically, if I add an image to a blog post, it will get processed 3 times (the blog post page itself, the /posts list page, the / list page) + once per tag . I have a site icon processed 22 times per build, for a total of 1721ms according to the 11ty benchmark log.
Caching would be great ; I see a solution in 2 steps :
image-hashes.json
file with the previous hash and generated file path, check it once during watch startup and compare the stored hashes against the actual hashes to invalidate or not the cache entries.Thoughts ?
Also: it looks like
gif2mp4
(which is even slower) is not running if an mp4 file already exists in the source folder (seeeleventy-high-performance-blog/_11ty/video-gif.js
Line 32 in 676789e
if (await exists(join("_site", dest))) {
instead ofif (await exists(dest)) {
The text was updated successfully, but these errors were encountered: