13th November 2021

Performance Comparison Saaze vs. Hugo vs. Zola

Zola is a static site generator written in Rust. Hugo is a static site generator written in Go. Simplified Saaze, Saaze for short, is written in PHP.

Task: Compare run times of Saaze vs. Hugo vs Zola. I didn't find a direct comparison so far. There is a comparison of Eleventy vs. Gatsby vs. Hugo vs. Jekyll vs. Next vs. Nuxt.

Installation size on Arch Linux for x86 and Odroid/ARM.

Generator Size/MB x86 Size/MB ARM
S.Saaze 1.1 0.05 0.05
Hugo 0.88.1 61.01 49.17
Zola 0.14.1 21.33 16.89

Run times are all in seconds. x86 is Intel NUC i5-4250U, 4 cores, max 2.6 GHz running Arch Linux 5.14.14; ARM is Cortex-A7, 8 core, big-little, max 1.5 GHz running Arch Linux 4.14.180-3. The 13 posts are the music posts in this blog, the 347 posts is the sum of all posts in this blog. 681 and 1349 are just copies of the 347 posts.

Generator #posts real x86 user x86 real ARM user ARM
S. Saaze 13 0.04 0.02 0.09 0.06
S. Saaze 347 0.15 0.09 0.37 0.25
S. Saaze 681 0.26 0.17 0.64 0.41
S. Saaze 1349 0.47 0.36 1.32 0.86
Hugo 13 0.22 0.31 0.76 1.47
Hugo 347 1.53 4.50 4.39 17.73
Hugo 681 2.43 7.34 6.76 29.88
Hugo 1349 3.87 12.41 11.83 52.08
Zola 13 0.08 0.06 0.27 0.23
Zola 347 0.36 0.31 1.16 1.10
Zola 681 0.60 0.58 2.05 1.99
Zola 1349 1.17 1.09 3.75 3.67

Initially one would think that static site generators written in Go and Rust are faster than generators written in PHP. This time, PHP beats them all.

User times in Hugo are way higher as Hugo uses threads to parallelize the task. But although it fully utilizes all the cores, it is way slower than Saaze and Zola. Neither Saaze nor Zola use threads. So if Saaze would use threads then the difference in run time would even get bigger. It would be quite easy to use threads in Saaze, i.e., so called entries and the chunks of collections could easily be processed in parallel.

Comparing the x86 real- and user-time:

Comparing the ARM real- and user-time:

Results for Hugo:

  1. Hugo is always the slowest, contrary to its constant bragging about "The world’s fastest framework for building websites"
  2. Hugo's templates are difficult to use
  3. Hugo is a CPU hog, also see Converting WordPress Export File to Hugo
  4. Hugo's Goldmark implementation does not honor plain, simple HTML
  5. In defense of Hugo: Hugo automatically uses syntax highlighting. This clearly slows down processing. I switched off syntax highlighting in Zola as well, otherwise Zola would be roughly two times slower.

So apparently it was a wise decision not to use Hugo for this blog, but go with Saaze instead, being way simpler to use and and an order of magnitude faster.

Added 13-Jan-2022: Similar findings with regard to inferior performance of Hugo vs. Zola were found in Static site generator benchmarks. The numbers are:

Generator Time in ms
Blade 2.9
Zola 29.1
Hugo 45.7

Here Blade is another static site generator written by Maroš Grego. It is programmed in Rust and uses the mustache templating system.

The Nift static site generator also beats Hugo by a factor of four for real time. For user time, i.e., not accounting for multi-core CPUs, Hugo is more than 6-times slower. The results:

Generator Real User Sys
Nift 1.107 1.846 1.982
Hugo 4.222 11.644 1.276

Nift is written in C, C++ and Lua. Source code in GitHub. It was written by Nicholas Ham.




Categories: web
Tags: Saaze, Hugo, Zola, Blades, Nift, static site generator
Author: Elmar Klausmeier