Jekyll profile build time

I use Jekyll to build my site, and it takes a little time to build a site (just a few minutes) (more than 600 posts). I suspect that some plugins may be responsible, but it seems that there should be a better way to profile assembly performance, and not just turn on and off different plugins and parsers.

The minimum conclusion during assembly does not give any hints - all the time it is just carried out at the "construction site" stage. 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 the root directory of my site and ran

 ruby-prof jekyll.rb 

The site looks like it is building perfectly, but the profiler just throttles 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 smarter way to profile the construction process of my site and find out why it is so slow?

Secondly, are there any tricks to speed up compilation time? (For example, I see the existence of the _cache directory in _plugins , but I don’t know exactly what it does. I also see the --auto flag for Jekyll, but I don’t see how I could configure it so that it always recompiles certain pages or does not change them (for example, the twitter plugin needs to be restarted every time) without recompiling immutable entries).

If someone wants to poke it first hand, the Jekyll-source site is located on Github , with some readme notes on additional pearls.

+4
source share
1 answer

Try Ruby GSL

 gem install gsl 

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

Need to speed up the build time.

-2
source

Source: https://habr.com/ru/post/1438096/


All Articles