5
votes

I use Jekyll to build my site, and it is starting to take a rather long time (a few minutes) to compile the site (of a bit more than 600 posts). I suspect that some plugins might be responsible, but it seems there must be a better way to profile the performance of the build than to simply toggle on and off different plugins and parsers.

The minimal output during the build doesn't give any hints -- all the time is simply spent in the "building site" step. I thought I could run the jekyll script through ruby-prof to get some idea, so I made a quick local copy of the jekyll script as jekyll.rb in my site root directory and ran

ruby-prof jekyll.rb

The site looks like it builds fine, but the profiler just chokes with an ugly core dump.

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted (core dumped)

Is there a more intelligent way to profile the building process of my site and figure out why it's so slow?

Secondly, are there any tricks to speed up the compile time? (For instance, I see the existence of a _cache directory in _plugins, but don't know exactly what it does. I also see an --auto flag to Jekyll, but don't see how I could configure it such that it always recompiles certain pages wether or not they have changed (e.g. the twitter plugin needs to be re-run each time) while not recompiling the unchanged posts).

If anyone wants to poke around first-hand, the Jekyll source of the site is on Github, with some notes in the readme about additional gem dependencies.

1
Did you ever find an answer to this?Chris Hough

1 Answers

-2
votes

Try Ruby GSL

gem install gsl

http://rb-gsl.rubyforge.org/

Should help speed up the build time.