# Incremental rebuilds

**URL:** <https://zola.discourse.group/t/incremental-rebuilds/2144>\
**Category:** Feature requests\
**Created:** [May 24, 2024, 10:28pm UTC](https://zola.discourse.group/t/incremental-rebuilds/2144 "2024-05-24T22:28:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![faassen](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/faassen/32/1221_2.png) [@faassen](https://zola.discourse.group/u/faassen)\
**Post date:** [May 26, 2024, 12:08pm UTC](https://zola.discourse.group/t/incremental-rebuilds/2144/3 "2024-05-26T12:08:44Z")

</div>

> Is it public somewhere? I’ve seen people with 100k+ pages build their site in 20s  
> so something is wrong there.

I was wondering after I posted this - it’s an old blog but the amount of pages isn’t that huge.

I’ve made it public:

> **[GitHub - faassen/secretweblog\_zola](https://github.com/faassen/secretweblog_zola)**
>
> Contribute to faassen/secretweblog\_zola development by creating an account on GitHub.

It’s using the tabi theme - I wonder how much the theme can impact things. I tried running a flamegraph over it but I think I need to make a debug build as it wasn’t very informative - any clues there?

> Zola used to have incremental rebuilds but it is _very_ hard to get it working  
> correctly and at some point a good third of the issues where people not seeing the  
> updated data in `zola serve`.

Yeah, that’s not optimal. I understand why it’s hard.

> > But adding an article to the blog likely does _not_ affect all other blog articles.

> Is it though? People can have some “related articles” section or whatever and that  
> new article would be shown on other articles. If you don’t care too much about  
> inconsistency when writing, you can use `zola serve --fast` that will only re-render  
> the page/section affected.

Yeah, sorry for being unclear but I do understand that. What I meant is that if there’s a way to mark dependencies or a lack of dependencies you can skip a lot of work. That said, it’s risky as any inconsistency would lead to unpredictable results.

> > So markdown content changes cannot affect other content on the blog; correct?

> Nope it can. If you show the summary of a page in a section and you edit one of  
> the page: the section needs to be re-rendered since its content might have  
> changed.

Ah, I wasn’t aware of the summary option. I’d cursorily scanned the theme and it wasn’t using this feature so I missed it.

That said, tracking references to `page.content` and `page.summary` is more restricted than tracking everything. The problem is that to do that reliably probably requires a static analysis of the templates to see how variables are traced. Anyway, thanks for answering; I knew it was going to be hard but I had hoped the problem could be restricted to make it more tractable. If I have such ideas in the future I shall get back to you. But if I can speed up zola in general it’s not going to matter.

> Also since you can fetch any page/section from any template, it’s impossible to  
> know for sure which template needs to be re-rendered. For quick re-render there’s  
> `zola serve --fast` as mentioned before.

That sounds like a useful option!It may be helpful to add a little bit of text to the cli-usage documentation to explain you can do this. I realize it doesn’t document all the CLI options but this sounds like a useful use case to mention.

---

_[View the full topic](https://zola.discourse.group/t/incremental-rebuilds/2144)._
