Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Speed benchmarks #325
I am considering switching from Hugo to Gutenberg (the big draw is the sane template system—thanks so much for that!). I'm also planning to write about the comparison between the two.
As part of that process, I've been running benchmarks on my site using hyperfine. I was expecting that Gutenberg would be faster, since Rust is generally a bit faster than Go. However, to my surprise, Gutenberg took nearly 3 times as long to build my (small) site: 151.8 ms vs Hugo's 57.8 ms. Based on that, I have a few questions.
Thanks again for your work on this project. I really like it, an may well switch even if it really isn't as fast. But I wanted to give you a chance to weigh in before I write a post saying it's much slower than Hugo at the moment.
Do you have a sample repo to see the difference? Is that the full build or only the rebuild time?
I haven't spent that much time improving performances as my sites are in the ms range as well and didn't feel the need to optimize more so there are quite a few
Almsot everything in Gutenberg is already parallelised so I think so the best improvement would come from reducing the number of clones.
I'm not planning to work on any perf improvement for a bit as there are still important features missing like i18n that are way more needed than gaining a few ms.
Thanks for the reply. I don't (yet) have a sample repo for a Gutenberg version of the site, since I'm still working on converting it. I'll update this thread when I do. The Hugo version of the repo is at codesections/codesections.
After a bit more testing, it looks like you're right about the syntax highlighting being a main culprit, though it looks like creating the search index contributes even more. I've listed out the times I've gotten below:
(Note: I don't currently use sass for my site, so I didn't test the speed of the sass compilation. I did turn it on a few times to make sure that checking for sass files did not take any measurable time; as expected, that option had no impact on speed).
I am a little confused by what you meant when you asked "Is that the full build or only the rebuild time". I would have thought that it was the rebuild time: it was the time I got from running
Thanks again for your reply and your work on this project. I'm definitely planning to switch!
Sorry for the confusion,
So Hugo & Gutenberg are at the same speed roughly despite the syntax highlighting being much more powerful in Gutenberg :o Pretty nice to know.
The search index is actually not built in parallel currently but I'm not sure it would be a significant speed increase, I'll have to add benchmarks and try it.
Chroma is basically Pygments in Go so it just highlights keywords.