Repository navigation
Add build-speed comparison with other documentation tools - #151
Merged
Merged
Conversation
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.
Contributor
Merging this PR will improve performance by 24.12%1 warning
Performance Changes
Tip Curious why performance improved? Comment Comparing |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
benchmarks/compare.pyand 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 indocs/img/, drawn bybenchmarks/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 frommain, like the logo, so it shows only after merging.compare.pywrites one generated site (frombenchmarks/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 longservetakes to show an edited page.--beforeclears each tool's cache outside the timed command.benchmarks/README.mdexplains 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-material9.8.0, Sumi 0.2.0, Zensical 0.0.74):mkdocsthemeAt 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.pyonly gets parentheses around one implicitly concatenated string, which the pinned ruff flags; the generated pages don't change.Checklist
docs/about/release-notes.mdupdated (if applicable)