Skip to content

Add build-speed comparison with other documentation tools - #151

Merged
shenxianpeng merged 3 commits into
mainfrom
claude/project-thread-u40qsb
Nov 2, 2026
Merged

shenxianpeng merged 3 commits into
mainfrom
claude/project-thread-u40qsb

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Adds benchmarks/compare.py and a "Build speed" section to the Comparison page (docs/about/comparison.md), plus one row in its "At a glance" table. The README gets a bar chart of the 1,000-page build times (light and dark SVGs in docs/img/, drawn by benchmarks/chart.py), linked to that section. The chart compares sites built with Material for MkDocs (Zensical's theme is based on it), and its caveats are inside the image. The README loads the chart from main, like the logo, so it shows only after merging.

compare.py writes one generated site (from benchmarks/corpus.py) for MkDocs NG (mkdocs, Material and Sumi themes), MkDocs 1.6.1, ProperDocs, Zensical, Sphinx, VitePress, Docusaurus and Starlight, then times clean builds and how long serve takes to show an edited page. --before clears each tool's cache outside the timed command. benchmarks/README.md explains how to run it.

Checked: every tool builds all 1,000 pages and a search index, with the same Markdown extensions; MkDocs NG keeps no cache between builds; caches of Zensical (.cache), Starlight (node_modules/.astro), Docusaurus (node_modules/.cache) and VitePress are removed before each clean run.

Results (4 cores, 2026-11-02, median of 3 clean builds; MkDocs NG main = 1.11.0rc1, mkdocs-ng-material 9.8.0, Sumi 0.2.0, Zensical 0.0.74):

1,000 pages Clean Cache kept
MkDocs NG, mkdocs theme 7.9 s
MkDocs NG + Material 11.5 s
MkDocs NG + Sumi 12.0 s
Zensical 17.4 s 6.4 s
ProperDocs 18.8 s
MkDocs 1.6.1 18.9 s
Sphinx, 4 processes 25.5 s
Starlight 30.3 s 21.0 s
MkDocs 1.6.1 + Material 34.8 s
ProperDocs + Material 35.2 s
VitePress 90.3 s
Docusaurus 109.6 s 40.2 s

At 5,000 pages (one run each) MkDocs NG takes 59.6 s, Zensical 185.7 s (59.2 s with its cache) and MkDocs 1.6.1 340 s. In serve, an edit shows after 2.4 s with MkDocs NG (6.0 s with Material), 0.8 s with Zensical and 19.6 s with MkDocs 1.6.1. The page says where Zensical is ahead (cached builds, serve) and why.

corpus.py only gets parentheses around one implicitly concatenated string, which the pinned ruff flags; the generated pages don't change.

Checklist

  • New tests added for new behavior (if applicable)
  • Documentation updated (if applicable)
  • Release notes docs/about/release-notes.md updated (if applicable)

benchmarks/compare.py writes the same generated site for MkDocs NG
(mkdocs, Material and Sumi themes), Zensical, Sphinx, VitePress,
Docusaurus and Starlight, then times clean builds and how long
`serve` takes to show an edited page. The Comparison page gets a
"Build speed" section with the results for 1,000 and 5,000 pages.
@shenxianpeng shenxianpeng self-assigned this Nov 2, 2026
@codspeed

codspeed Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 24.12%

1 warning

⚠️ 1 benchmark with a significant change ran on different hardware

Its base and head results were measured on machines with a different CPU, core count or memory, so the change might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚡ 1 improved benchmark
✅ 28 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_get_yaml_loader 398.9 µs 321.3 µs +24.12%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/project-thread-u40qsb (1a1f392) with main (0ff260b)

Open in CodSpeed

benchmarks/chart.py draws the 1,000-page clean-build times as light and
dark SVGs, linked to the Build speed section of the Comparison page.
- Clear caches outside the timed command (new `--before` option): Zensical's
  timed command used to delete its own output, and Docusaurus and Starlight
  kept caches in node_modules, which made some of their runs warm.
- All 1,000-page times are now the median of 3 clean builds; times with each
  tool's cache kept are listed next to them.
- The README chart compares Material for MkDocs sites (Zensical's theme is
  based on it) and carries its caveats inside the image.
@shenxianpeng
shenxianpeng merged commit f4b3e21 into main Nov 2, 2026
22 of 23 checks passed
@shenxianpeng
shenxianpeng deleted the claude/project-thread-u40qsb branch November 2, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant