Comparing Docs Framework Build Times

Ready-made documentation frameworks — Docusaurus, Starlight and VitePress — save months of theme work, and choosing between them is usually a question of ecosystem, authoring format and features. Build time rarely features in the comparison until the site is large, at which point it becomes the thing everyone complains about: preview deploys that take ten minutes, writers who stop waiting for them, CI bills that grow with every guide.

This guide benchmarks the three frameworks on the same documentation corpus at three sizes, measures cold and warm builds, peak memory and output size, and explains what drives each framework's numbers and which settings help. It is part of Docs Frameworks: Docusaurus, Starlight and VitePress, and uses the method from How to Benchmark Hugo vs Astro Build Speeds.

Prerequisites and Method

  • Corpus: a real product documentation set of 2,000 Markdown pages (1.4 million words, 11,800 code blocks, 640 images), converted to each framework's conventions with a script. Subsets of 500 and a synthetic 5,000-page version (duplicated with varied slugs) were used for scaling.
  • Versions: Docusaurus 3.6 (webpack and the faster Rspack option), Starlight 0.29 on Astro 4.16, VitePress 1.5.
  • Features enabled in all three: syntax highlighting (Prism in Docusaurus, Shiki in the others), sidebar generated from folders, local search index (Docusaurus with @easyops-cn/docusaurus-search-local, Starlight with its built-in Pagefind, VitePress with its built-in MiniSearch), no image optimization.
  • Machine: GitHub Actions ubuntu-latest larger runner, 8 vCPU, 32 GB RAM; timings are medians of five hyperfine runs, cold builds with all caches removed, warm builds with framework caches present and no content changes.
hyperfine --runs 5 --prepare 'rm -rf .docusaurus build node_modules/.cache' 'npx docusaurus build'
hyperfine --runs 5 --prepare 'rm -rf dist node_modules/.astro' 'npx astro build'
hyperfine --runs 5 --prepare 'rm -rf .vitepress/dist .vitepress/cache' 'npx vitepress build docs'

Results at 2,000 Pages

FrameworkCold buildWarm buildPeak memoryOutput size
Docusaurus 3.6 (webpack)166 s139 s5.8 GB118 MB
Docusaurus 3.6 (faster, Rspack)81 s58 s4.1 GB116 MB
Starlight 0.2971 s49 s2.6 GB74 MB
VitePress 1.538 s36 s1.9 GB61 MB
Cold build time of each docs framework on the same corpus Horizontal bars of cold build time for 2,000 pages. Docusaurus with webpack 166 seconds. Docusaurus with the faster Rspack option 81 seconds. Starlight 71 seconds. VitePress 38 seconds. Cold build time at 2,000 pages Docusaurus (webpack) 166 s Docusaurus (Rspack) 81 s Starlight 71 s VitePress 38 s
Median of five hyperfine runs, 8-vCPU runner, highlighting and local search enabled in all four.

What Drives Each Number

Docusaurus compiles every page's MDX into a React component module, bundles all of them with webpack (or Rspack) into client and server bundles, then server-renders every route with React. Bundling thousands of page modules is the dominant cost, and it is also why memory is high. The future.experimental_faster option switches to Rspack, SWC and Lightning CSS, which halved the cold build on this corpus. Docusaurus also ships the most client JavaScript per page, because it is a React single-page app after the first load.

Starlight uses Astro's static rendering: pages are rendered to HTML with no client framework, then Pagefind indexes the output. Most build time went to Markdown processing and Shiki highlighting (about 40%), rendering (35%) and Pagefind indexing (12%). Warm builds benefit from the content layer cache, which skips re-parsing unchanged entries.

VitePress renders Markdown with markdown-it, compiles each page into a Vue component and server-renders with Vue. It is fast because markdown-it is fast and Vue SSR of mostly static templates is cheap. Its warm build barely differs from cold because it has little to cache — it is already mostly doing the minimum work.

Build pipeline stages per docs framework A matrix of three frameworks. Docusaurus parses Markdown as MDX, bundles every page with webpack or Rspack, renders with React and ships a React single-page app. Starlight parses with remark and highlights with Shiki, renders with Astro to static HTML and indexes with Pagefind. VitePress parses with markdown-it and highlights with Shiki, renders with Vue SSR and hydrates as a Vue single-page app. Where each framework spends its build time Stage Docusaurus Starlight VitePress Parse MDX to React remark + Shiki markdown-it + Shiki Bundle every page module islands only theme + pages Render React SSR Astro static Vue SSR Client React SPA HTML, little JS Vue SPA
The bundling step is the main reason Docusaurus is slowest; the parser choice is the main reason VitePress is fastest.

Scaling From 500 to 5,000 Pages

Framework500 pages2,000 pages5,000 pages
Docusaurus (Rspack)29 s81 s224 s
Starlight22 s71 s186 s
VitePress12 s38 s101 s

All three scale roughly linearly with page count. Docusaurus with webpack could not complete the 5,000-page build on a standard 7 GB runner — it ran out of memory — and needed the 32 GB machine and NODE_OPTIONS=--max-old-space-size=12288. Starlight and VitePress completed on the standard runner.

Build time scaling from 2,000 to 5,000 pages Paired bars of cold build time. Docusaurus with Rspack went from 81 to 224 seconds. Starlight went from 71 to 186 seconds. VitePress went from 38 to 101 seconds. Build time at 2,000 and 5,000 pages 2,000 pages 5,000 pages Docusaurus (Rspack) 81 s 224 s Starlight 71 s 186 s VitePress 38 s 101 s
The 5,000-page corpus duplicates real pages with varied slugs; scaling is close to linear in all three.

Settings That Moved the Numbers

  • Docusaurus: enable future.experimental_faster: true (−51%); remove unused plugins such as the blog if the site has none (−6%); set onBrokenLinks: 'warn' only in preview builds, since link checking is a noticeable share of the build on large sites; cache .docusaurus and node_modules/.cache between CI runs, as described in Caching node_modules in GitHub Actions for Faster SSG Builds.
  • Starlight: persist node_modules/.astro between CI runs so the content layer store is warm (−31% on warm builds); restrict Shiki to the languages used; exclude generated API pages from Pagefind with pagefind: false in frontmatter where search results for them are unwanted.
  • VitePress: already lean; the one change that helped was moving large JSON data files out of page frontmatter and into data loaders, which cut memory by 400 MB.

Beyond Build Time

Build time is one factor among several, and it should not decide on its own. Starlight ships almost no JavaScript per page and passes Core Web Vitals most easily; Docusaurus has the richest plugin ecosystem and versioning built in; VitePress is the natural choice for Vue projects and has the fastest builds. The comparison of authoring and features is in Docusaurus vs Starlight for Product Documentation and VitePress for Library Documentation. Where build time does become decisive is versioned documentation: Docusaurus versioning multiplies page count by the number of versions kept, so a 2,000-page site with four versions is an 8,000-page build.

Reproducing the Benchmark on Your Own Content

Published benchmarks, including this one, are a starting point. Content shape changes the results more than most teams expect: a corpus heavy in code blocks favours whichever framework highlights fastest, a corpus of many small pages exposes per-page overhead, and MDX with many imported components penalises frameworks that bundle every page. The benchmark here took about a day to reproduce on a second team's content, most of it spent on the conversion script.

Keep the conversion mechanical so it can be rerun: a script that copies Markdown, rewrites frontmatter keys to each framework's names (sidebar_position in Docusaurus, sidebar.order in Starlight, the VitePress sidebar config), and converts admonition syntax (:::note is shared by Docusaurus and VitePress; Starlight uses :::note via its asides as well, with slightly different title syntax). Record the exact versions, flags and machine in the results file. When the team reran the benchmark six months later after upgrading Docusaurus, the numbers were comparable because the whole setup was in a repository rather than in someone's notes.

Measured Impact

The team that commissioned the benchmark was on Docusaurus with webpack, with a 2,100-page site and three kept versions:

MeasureBeforeAfter (Docusaurus faster + caching)
Preview build per pull request11.4 min4.9 min
Production build12.1 min5.2 min
CI runner32 GB larger runnerstandard 16 GB runner
Monthly CI minutes for docs9,8004,300

They stayed on Docusaurus — versioning and existing React components outweighed the remaining gap — and dropped the oldest version from the build, taking preview builds to 3.8 minutes.

Pitfalls & Rollback

  • Benchmarking with different features. Search indexing and highlighting are large shares of build time; enable the same set everywhere.
  • Warm caches in "cold" runs. Clear framework caches explicitly in --prepare.
  • Ignoring memory. A faster build that needs a larger runner may cost more.
  • Experimental flags in production without a fallback. Keep the previous configuration one commit away.
  • Rollback: framework flags such as experimental_faster are single configuration lines; removing them restores the default toolchain.

Conclusion

On the same 2,000-page corpus, VitePress built in 38 seconds, Starlight in 71, and Docusaurus in 166 — or 81 with its Rspack-based faster option. All three scale linearly, and Docusaurus needs markedly more memory. Build time rarely decides the choice alone, but on large or versioned sites it should be measured early, and the framework-specific settings above recover a large share of it.

FAQ

Which docs framework builds fastest?

On the 2,000-page corpus measured here, VitePress built fastest at about 38 seconds, Starlight took about 71 seconds and Docusaurus about 166 seconds for a cold build. The ranking held at 500 and 5,000 pages, although the gaps changed with page count.

Why is Docusaurus slower?

Docusaurus compiles every page as MDX into React components, bundles them with webpack or Rspack, and server-renders each page with React. Each step is heavier than Starlight's Astro rendering or VitePress's Vue SSR. Docusaurus 3.6 and later can use Rspack through the faster option, which cut the build roughly in half here.

Does build time matter for a documentation site?

It matters for preview deploys and for how quickly fixes reach readers. A three-minute build on every pull request is tolerable; a twelve-minute build at 10,000 pages changes how teams work, because writers stop waiting for previews.

How do I benchmark fairly?

Use the same content converted to each framework's conventions, the same machine, clean caches for cold builds, several runs with hyperfine, and comparable features enabled, such as search indexing and syntax highlighting. Report memory and output size alongside time.

Filed underComparisonsAstroDocusaurusStarlightVitePress