Hey folks, I’m new. I just spent all day switching my 2005 vintage blog from Nikola, written in Python, to Zola. I like Zola; I had few issues configuring it and making it do what I like.
One thing that disappointed me a little was the performance of rebuilds. It takes 7 to 8 seconds to regenerate all 233 pages of my blog. The fact that zola serve
has no debouncing is not helping as every subconscious save on my part triggers a 7 second rebuild (though I see there is work being done on this recently). But even with debouncing it may be a little bit slow - we’ll see.
Nikola (which I have been using since 2013) has fast rebuilds because it does some clever change tracking. Sufficiently clever change tracking is very difficult implement, or is going to happen any time soon, but I thought I’d start a conversation about it, not hindered by any practical knowledge.
The problem is that templates can pick up information from a wide variety of places. Adding a page potentially affects the archive page, the tags page, the feed page, the landing page. To incrementally rerender only update those pages that are affected, you’d need to do some analysis of the data dependencies of each template and that’s definitely difficult.
But adding an article to the blog likely does not affect all other blog articles. Perhaps we could come up with a shortcut and have a way to explicitly declare somewhere that we don’t want to rerender all pages? I haven’t worked out the details - it’s tricky but perhaps more doable.
Let’s move on to another idea. The markdown content doesn’t allow action at a distance as far as I can see - no inclusion of information, even titles, into another. There is link checking, but that’s just about it, and checking the outgoing internal links of a single markdown file is going to be fast enough.
So markdown content changes cannot affect other content on the blog; correct? So we could introduce a system where we detect whether only markdown was changed, not anything in the configuration block, and if so, only rerender the markdown and the page that includes it. This means that if I save a file while I’m typing, I’m going to see an instant update (if I don’t touch the config block on top).
Of course there are issues with this idea: if you include full page content into an atom feed, then the atom feed also needs to be rebuilt each time you save, and that includes all the content of all the pages. But perhaps we can come up with enough restrictions to make something like this work? Anyway, I thought I’d bring it up for discussion.