<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Posts about test</title><link>https://chriswarrick.com/</link><atom:link href="https://chriswarrick.com/blog/tags/test.xml" rel="self" type="application/rss+xml" /><description>A rarely updated blog, mostly about programming.</description><lastBuildDate>Thu, 23 Jul 2015 15:10:00 GMT</lastBuildDate><generator>https://github.com/Kwpolska/YetAnotherBlogGenerator</generator><item><title>Static Site Generator Speed Test (Nikola, Pelican, Hexo, Octopress)</title><dc:creator>Chris Warrick</dc:creator><link>https://chriswarrick.com/blog/2015/07/23/ssg-speed-test/</link><pubDate>Thu, 23 Jul 2015 15:10:00 GMT</pubDate><guid>https://chriswarrick.com/blog/2015/07/23/ssg-speed-test/</guid><description>
I tested the speed of four static site generators: Nikola, Pelican, Hexo and Octopress, in a clean environment.  Spoiler alert: Nikola won.
Disclaimer: author is a developer and user of Nikola.  The test environments used were the same for all four generators.

Generators tested

Nikola v7.6.1, by Roberto Alsina, Chris Warrick and contributors; Python; MIT license
Pelican v3.6.0, by Alexis Metaireau and contributors; Python; GNU AGPL license
Hexo v3.1.1, by Tommy Chen and contributors; Node.js; MIT license
Octopress v2.0, by Brandon Mathis and contributors; Ruby; MIT license (based on Jekyll)

</description><content:encoded><![CDATA[
<p>I tested the speed of four static site generators: Nikola, Pelican, Hexo and Octopress, in a clean environment.  Spoiler alert: Nikola won.</p>
<p><em>Disclaimer:</em> author is a developer and user of Nikola.  The test environments used were the same for all four generators.</p>
<section id="generators-tested">
<h1>Generators tested</h1>
<ul class="simple">
<li><p><a class="reference external" href="https://getnikola.com/">Nikola</a> v7.6.1, by Roberto Alsina, Chris Warrick and contributors; Python; MIT license</p></li>
<li><p><a class="reference external" href="http://blog.getpelican.com/">Pelican</a> v3.6.0, by Alexis Metaireau and contributors; Python; GNU AGPL license</p></li>
<li><p><a class="reference external" href="https://hexo.io/">Hexo</a> v3.1.1, by Tommy Chen and contributors; Node.js; MIT license</p></li>
<li><p><a class="reference external" href="http://octopress.org/">Octopress</a> v2.0, by Brandon Mathis and contributors; Ruby; MIT license (based on Jekyll)</p></li>
</ul>



</section>
<section id="setup">
<h1>Setup</h1>
<p>Every site generator was set up in an identical <strong>clean</strong> environment, using Ubuntu 15.04, x64, as a 512 MB DigitalOcean VM with a 20 GB SSD drive. The machine was updated, an user account with passwordless sudo was created, and <code class="docutils literal"><span class="pre">build-essential</span></code> was installed. Tests were run by an automated installer and timer, written in Bash and C, respectively (custom; source code is available). Pre-compiled wheels for lxml and Pillow were used for Nikola testing, because lxml cannot be compiled with less than 1.5 GB of RAM; they were built with <code class="docutils literal">pip wheel lxml pillow</code> outside of the testing environment (on a local VM). The machine was reimaged after every test. Lists of installed Python/Ruby/Node packages are available in the GitHub repo (see below).</p>
</section>
<section id="input">
<h1>Input</h1>
<p>Every site generator was given the same set of 179 log files from #nikola on freenode. The raw logs contain 1209507 bytes (1.1 MiB) of plain text. The logs were processed into post files, which fit the format of each engine (reST or Markdown), containing mandatory metadata, an introductory paragraph and a code block (using <code class="docutils literal">::</code> for reST, four spaces for Markdown). One file had to be altered, because they contained the <code class="docutils literal">{{</code>  sequence, which was misinterpreted as internal templating by Hexo and Octopress — it was replaced by a harmless <code class="docutils literal">~~</code> sequence for all four generators.</p>
<p>The generators used default config, with one exception: highlighting was disabled for Hexo. The highlighting would cause an unfair advantage (other generators did not automatically highlight the code boxes), and led to very high build times (see table 4 in comparison spreadsheet).</p>
</section>
<section id="build">
<h1>Build</h1>
<p>Sites were built a total of 110 times, in 10 cycles of 11 builds each. The first build of a cycle was a fresh build, the remaining 10 were rebuilds. Sites and cache files were removed after each cycle.</p>
</section>
<section id="results">
<h1>Results</h1>
<p>Because Nikola and Hexo use incremental rebuilds, the results were compared in two groups: 11 and 10 runs.</p>
<section id="average-build-times-in-seconds">
<h2>Average build times (in seconds)</h2>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>#</th>
<th>Generator</th>
<th>Average of 11 runs</th>
<th>Average of 10 runs</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Nikola</td>
<td>2.38290</td>
<td>2.06057</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Pelican</td>
<td>2.61924</td>
<td>2.62352</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Hexo</td>
<td>6.27361</td>
<td>6.21267</td>
</tr>
<tr>
<th scope="row">4</th>
<td>Octopress</td>
<td>9.57618</td>
<td>9.47550</td>
</tr>
</tbody>
</table></section>
<section id="full-results">
<h2>Full results</h2>
<p class="lead">Full results are available in <a class="reference external" href="https://chriswarrick.com/pub/ssg-test-results.ods">ods format</a>.</p>
</section>
<section id="raw-results-and-configuration">
<h2>Raw results and configuration</h2>
<p>Raw results (<code class="docutils literal">.csv</code> files from the test runner) and configuration is available in the <a class="reference external" href="https://github.com/Kwpolska/ssg-test">GitHub repo</a>. Log files and converted posts are not available publicly; however, they can be provided to interested parties (<a class="reference external" href="https://chriswarrick.com/contact/">contact me</a> to obtain them).</p>
</section>
</section>
<section id="questions-and-answers">
<h1>Questions and answers</h1>
<section id="why-not-plain-jekyll">
<h2>Why not plain Jekyll?</h2>
<p><strong>Plain Jekyll was disqualified</strong> on the basis of missing many features other generators have, leading to an unfair advantage. The aim of this test was to provide similar setups for each of the four generators. Jekyll generates a very basic site that lacks some elements; a Jekyll site does not have paginated indexes, (partial) post text on indexes, any sort of archives, etc. A Jekyll site contains only one CSS file, index.html, feed.xml, and the log posts. On the other hand, sites generated by Pelican, Nikola and Hexo contain more files, which makes the builds longer and the website experience richer (archives, JS, sitemaps, tag listings).</p>
<p>On the basis of the above, <strong>Octopress</strong> was chosen to represent the Jekyll universe at large. Octopress sites have more assets, a sitemap, archives and category listings — making it comparable to the other four contenders. However, tests were performed for Jekyll. The average result from 11 builds was 2.22118, while the average result from 10 builds was 2.23903. The result would land Jekyll on the 1st place for 11 builds, and on the 2nd place for 10 builds.</p>
</section>
<section id="why-not-myfavoritessg">
<h2>Why not $MYFAVORITESSG?</h2>
<p>I tested only four popular generators that were easy enough to set up. I could easily extend the set if I had time and friendly enough documentation to do so. I can add a SSG, provided that:</p>
<ul class="simple">
<li><p>it’s easy to configure</p></li>
<li><p>it has a default config that provides a working site with a feature set comparable to other SSGs tested here (see <a class="reference internal" href="https://chriswarrick.com/blog/2015/07/23/ssg-speed-test/#why-not-plain-jekyll">Why not plain Jekyll?</a>)</p></li>
</ul>
</section>
</section>
]]></content:encoded><category>Internet</category><category>blog</category><category>Hexo</category><category>jekyll</category><category>Nikola</category><category>Octopress</category><category>Pelican</category><category>Python</category><category>static site generators</category><category>test</category><category>web development</category></item></channel></rss>