Skip to content

[BUG] Build time explosion due to command page sidebar #321

@stockholmux

Description

@stockholmux

Describe the bug
Related to #319 and #320

I've noticed that the build times have shot up after #299 to north of around 50 seconds - which is bonkers.

It appears this is due to the inclusion of the command page sidebar.

Given the repetitious nature of this page element, this should be abstracted into a macro and/or cached during build. At time of writing there is 416 pages rendered in this section, each one has to open 416 + 4 (json files that index all the commands). That means that generating this sidebar adds 174,720 JSON file opens and parses.

To Reproduce

Run zola serve note CPU usage and the build time.

On my machine the build time is between 45 and 76 seconds and typically pegs the CPU to over 200%.

Expected behavior

The site should build in less than 10 seconds.

Screenshots

n/a
Host/Environment (please complete the following information):

macOS

Additional context

n/a

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions