Skip to content
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

Long build time #839

Closed
yakkomajuri opened this issue Jan 12, 2021 · 8 comments
Closed

Long build time #839

yakkomajuri opened this issue Jan 12, 2021 · 8 comments

Comments

@yakkomajuri
Copy link
Contributor

yakkomajuri commented Jan 12, 2021

Our Netlify builds are failing for getting over their 15min limit. They seem to be quite proactive in upgrading people to 30min limits upon request, so I've made a request for it.

A never-ending struggle with serverless tools...

Also wondering if we should do something to lower that build time?

EDIT: The underlying problem is a long build time due to image thumbnail generation. Netlify limit has been fixed.

@yakkomajuri
Copy link
Contributor Author

Update: I installed a plugin for Gatsby build caching with Netlify

@yakkomajuri
Copy link
Contributor Author

Also added incremental building

@Tbhesswebber
Copy link
Contributor

I just accidentally did a whole bunch of research to try to figure out why my last PR failed in CICD. Here are the logs: https://app.netlify.com/sites/posthog/deploys/5ffdb606c8a61d0007af8a30

The relevant line is almost at the very bottom:

10:02:33 AM: success Generating image thumbnails - 949.151s - 1295/1295 1.36/s

In my digging, it looks like the best options are to turn-off processing in the pipeline, pre-process and cache the images separately from the build, or to use a different system as your image CMS. There is also a parallel-runner for Gatsby and Netlify.

This github issue has a lot of discussion on the topic and this one has some context around the image resizing piece of things, although it only extends to static images and not gifs.

I don't know if any of those are helpful, but I just thought I would share since I already went down that rabbit hole!

@mariusandra
Copy link
Collaborator

I have some pretty good experience using imgix for a previous project. They seem to have a gatsby plugin that promises to "speed up your build times significantly.".

@Tbhesswebber
Copy link
Contributor

I don't know how relevant this is, but this is another thing that I stumbled across earlier that recommends against the usage of imgix.

gatsbyjs/gatsby#25827 (comment)

Warning about imgix, Unsplash apparently uses them and refers to their API for image transformations. When I used that (via Unsplash) I noticed images would sometimes lose tone mapping(or looked like that), in that the warm tones were swapped for cold ones, I guess there either was a bug or setup issue that stripped away some information of the image.. I did not encounter that when I rewrote the transformations via a small sharp js script to pre-process locally.

@mariusandra
Copy link
Collaborator

Interesting re changing tones. Though from that I read that if it's good enough for unsplashed, it'll probably be good enough for us as well.

I never noticed any color changing myself, though perhaps I just didn't know to look for it. In any case, I was really happy to never have to worry about generating thumbnails after switching to imgix. Their pricing made more sense than the competition (cloudinary?) as well.

@yakkomajuri
Copy link
Contributor Author

So the original issue has been fixed now as we've gotten bumped to 30min builds. However, the underlying issue of a long build time due to image thumbnails still persists.

@yakkomajuri yakkomajuri changed the title Netlify Build Limit Long build time Jan 13, 2021
@yakkomajuri
Copy link
Contributor Author

What has been done towards this:

We should be good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants