Z12 Performance Of Serve Content Changes

Now we’ve been able to migrate our site to a working V12 (subject to 12.1 fixes) we’ve been using it as part of our content production and we’ve noticed that performance when editing content, with the new hashtable approach to HTML, is really slow.

Zola 11 Serve

C:\Users\Iria\Zola\production (master -> origin)
λ zola serve -i 192.168.1.101 -p 2015 -u 192.168.1.101
Building site...
-> Creating 180 pages (0 orphan), 6 sections, and processing 0 images
Done in 27.6s.

Listening for changes in C:\Users\Iria\Zola\production\{content, config.toml, static, templates, themes}
Press Ctrl+C to stop

Web server is available at http://192.168.1.101:2015

Change detected @ 2020-09-22 17:41:58
-> Content changed C:\Users\Iria\Zola\production\content/language-courses\podcast-201-250\index.md
Done in 159ms.

Change detected @ 2020-09-22 18:04:42
-> Content changed C:\Users\Iria\Zola\production\content/language-courses\podcast-201-250\index.md
Done in 155ms.

After the initial build Z11 is slow but the changes after that to markdown are in ms.

Z12 Serve

C:\Users\Iria\Zola\production (master -> origin)
λ zola serve -i 192.168.1.101 -p 2015 -u 192.168.1.101
Building site...
-> Creating 180 pages (0 orphan), 6 sections, and processing 0 images
Done in 20.5s.

Listening for changes in C:\Users\Iria\Zola\production{config.toml, content, static, templates}
Press Ctrl+C to stop

Web server is available at http://192.168.1.101:2015

Change detected @ 2020-09-22 18:13:55
-> Content changed C:\Users\Iria\Zola\production\content\discount\index.md
-> Creating 180 pages (0 orphan), 6 sections, and processing 0 images
Done in 20.4s.

Change detected @ 2020-09-22 18:15:27
-> Content changed C:\Users\Iria\Zola\production\content\discount\index.md
-> Creating 180 pages (0 orphan), 6 sections, and processing 0 images
Done in 20.8s.

Change detected @ 2020-09-22 18:16:46
-> Content changed C:\Users\Iria\Zola\production\content\testimonials\email\index.md
-> Creating 180 pages (0 orphan), 6 sections, and processing 0 images
Done in 20.9s.

Notice now that every change made to markdown.md files results in a full 20 seconds

That’s expected, the new approach rebuilds the whole site to avoid all the weird bugs the smart rebuild had. To get back roughly the same speed you had before, use zola serve --fast that will rebuild only the page that changed.

Thanks for the CLI switch :slight_smile: