Incremental regeneration in latest jekyll build
31 Jan 2015 • permalink
jekyll is an awesome static generator but its regenetion time is totally unexceptable. It works well when you have small number of posts but start to degrade as number of posts increases. Actually, I don’t care about it much when I
git push to the repo because my VPS is using SSD-cached but previewing the site at
localhost is such a pain.
So when I take a look at
jekyll again today and see this pull request, I’m so excited and couldn’t help but clone the repo and rebuild
jekyll to test it out myself.
git clone https://github.com/jekyll/jekyll.git gem build jekyll.gemspec gem install jekyll*.gem
A quick look at
jekyll reveals that it now has a file named
.jekyll-metadata to keep track of
mtime of the change file and their dependencies.
D:/Source/myawesomeblog.com/_posts/2015-01-31-welcome-to-jekyll.markdown: mtime: 2015-01-31 12:31:57.000000000 +07:00 deps: - /Source/myawesomeblog.com/_layouts/post.html - D:/Source/myawesomeblog.com/_includes/head.html - D:/Source/myawesomeblog.com/_includes/header.html - D:/Source/myawesomeblog.com/_includes/footer.html - /Source/myawesomeblog.com/_layouts/default.html
I tested the beta gem on an old PC of mine with 5400rpm HDD to see how much speedup the new build offers. Prior this, when using
jekyll serve, the regeneration speed is really slow. It takes minutes (literally minuteS) for a site with barely over 100 posts.
It does actually speedup. A quick change in a single file now takes 17 to 40 seconds to regenerate (of total ~100 posts). Still no where near the speed I expect but it’s a big step up from where it was. I’ll take it :)
This pull request is expected to be in
jekyll 2.6.0 release.