Build time reduction

Hi, i have like 900 posts and it takes 9 minutes to build them can some one help me out here, i think it’s the process that starts after rendering i.e. the write process. the build time used to be 2.5 minutes and all of a sudden it went to 9 mins and in the logs there is almost a 7 mins pause after the rendering process. please help.

Try running it with the profile flag and paste the results:

jekyll build --profile

Did you upgrade recently ? Please share your repo URL if it’s public.

We had a balloon in our build time when someone added something to a layout used on most pages that was like “assign oldcheck = site.pages / for items in oldcheck, if items.old = true, then add some crap to the page” so a 1,000 page query has to run 1,000 times only to hit on 3 pages. It was an expensive brain fart that doubled our build time. Changing it to “if page.old, put some crap on this page” fixed the problem.

Running with --profile can help you find the culprit in most cases. Keep in mind that your layouts will often represent the build impact of their includes.