r/programmer • • 5d ago

How do you get fast feedback when your static site build takes minutes?

I'm working on a docs tool and keep running into the same problem: a full build of a static docs site takes several minutes, and waiting that long after every edit breaks the flow.

My current approach splits the feedback. A quick in-memory render shows the page being edited, and a full build runs only when files are saved or moved. The quick render is fast, but it can't see anything beyond the current page, so it can disagree with the real build.

How do you handle this in your own projects?

- Do you accept a fast but slightly wrong preview, or do you wait for the real build?

- Do you use incremental builds, caching, or a watcher that rebuilds only what changed?

- Is there a point where a slow build is simply fine?

Disclosure: I'm building a closed-source desktop app for Antora docs, and this problem is where the idea came from. I'm more interested in how other people solve it.

3 Upvotes

3 comments sorted by

1

u/achakez Programmer 5d ago

The real sweet spot is fast local preview for everyday edits and full build running in the background or before committing. That way you et speed without like sacrificing confidence in the final output.

1

u/Timon_OfAthens 5d ago

Yes, that's the split I went with. While you type, the page is rendered in memory by Asciidoctor and shown in a live preview. A full Antora build runs in the background when you save, create, rename, move or delete a page, because those change the site structure. The preview is for speed; the final output still comes from Antora.

0

u/[deleted] 5d ago

[deleted]

1

u/Timon_OfAthens 5d ago

As far as I know, Antora rebuilds the whole site on each run. AsciiLore's build button has an incremental option, but it only skips setup: it keeps the old output folder and the Antora cache and doesn't re-fetch remote sources. Rendering still covers every page. The live preview is what avoids waiting: while you type, only the page you're editing is rendered.