12th November 2021
I already described some changes I made to the original Saaze software:
In Making Static Site Generator 30-Times Faster I already described that removing unnecessary dependencies improved run-time considerably. The final dependency, which remained, was the Blade template. For this Saaze used Jens Seger's Blade implementation.
This whole template usage didn't make sense to me, when you are already programming in PHP, as PHP by itself is already an excellent template language. But as Blade was advertised to mimique PHP, I left Blade as is in the first place. I always struggled in passing variables from Saaze to Blade, so the final straw was quickly inflamed. I dropped this Blade templating, which never felt right. This again boosted performance considerably. In addition using Saaze is now way easier. You use plain PHP, which can easily be checked with
php -l template-file
You do not have to wait for the build-run of Saaze, to identify any syntax errors you made.
With all this removal of useless and obstructive stuff, which is also slowing down enormously, we can now say that we are more than 500-times faster than the original Saaze.
Added benefit: Less code to debug, less code which can have bugs.
To illustrate the risk with many unnecessary dependencies: Malware found in coa and rc, two npm packages with 23M weekly downloads. Here, only two base packages can infect a huge number of software which depend on them. Drew DeVault is paying people money, if they remove trivial npm packages, see I will pay you cash to delete your npm module.
Installation size on Arch Linux for x86 and Odroid/ARM.
Run times are all in seconds. "S. Saaze" is our Simplified Saaze.
|Generator||#posts||real x86||user x86|
Testing machine was Intel NUC, i5-4250U, max. 2.6 GHz, Arch Linux 5.14.14. The 348 are the posts of this blog. The 13 posts are the music-posts. The other test scenarios are just doubling of this data.
Tags: Simplified Saaze, Saaze, static site generator
Author: Elmar Klausmeier