In my experience Jekyll build times depending on the following:
- How optimized your layouts and includes are.
- Number of documents/posts/pages etc. you’re converting into HTML.
- If you’re using Jekyll’s built-in support for Sass or a plugin like Jekyll Assets to handle it.
- If you have a large amount of static files (e.g. images).
- Plugins.
No. 1: If you make use of Liquid’s {% for %}
tag to loop over site.posts
you’re build times will take a hit. You generally see this being used for related post modules or tag clouds on each post. This sort of thing can add up as it has to loop through every post, and if you have hundreds or thousands of .md
files you’re going to see build times hit minutes instead of seconds.
No. 2: Generally small sites using a basic layout without anything fancy can build pretty quick… not instant like Hugo, but in a few seconds which isn’t awful.
When you get over a thousand posts/documents build times are going to slow down and could be a few minutes or longer. As an example my personal site has just over 1,000 posts, has paginated category/tag archive pages, related posts on each post page, etc. and takes about 6-8 minutes to build.
No . 3: Using Jekyll’s built-in Sass preprocessing isn’t slow per say, but any changes made to Sass files will trigger a full rebuild of your site when developing locally. So if your site takes on average 20s to build, that’s how long each Sass change will take. Which can be a real bummer for rapidly iterating on a design.
What you can do is decouple asset building and use something like Gulp or Grunt to do that for you, then pipe it in instantly with Browsersync. This doesn’t force Jekyll to rebuild the site and is a nice separation of concerns if you’re into using multiple tools to do the job.
No. 4: Having a lot of static files like images in your Jekyll source folder can bog things down too. Every build Jekyll has to copy these files, which can be I/O constraining depending on how quickly your device can move files around.
In my case I have just under a gigabyte of images, which definitely slowed things down moving files around. This was another thing I decoupled from Jekyll and move around myself using Gulp.
No. 5: Depending on what plugins you decide to use (if any) can have a negative impact on builds. Plugins that generate pagination, feeds, responsively sized images, etc. are all going to add to the build time. The leaner your setup the quicker your builds.
There are other things you can do if you’re curious… shameless promotion of my blog post on the subject.