docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
Docusaurus v3.6 - enable Docusaurus Faster
Description
Upgrade to Docusaurus v3.6 - Enable Docusaurus Faster
Motivation and Context
It's faster, see https://github.com/facebook/docusaurus/issues/10556
Benchmarks
Cold builds - almost 3x faster:
hyperfine --prepare 'yarn workspace demo clear' --runs 3 'DOCUSAURUS_FASTER=false yarn build-demo' 'DOCUSAURUS_FASTER=true yarn build-demo'
Benchmark 1: DOCUSAURUS_FASTER=false yarn build-demo
Time (mean ± σ): 26.049 s ± 0.252 s [User: 49.003 s, System: 5.959 s]
Range (min … max): 25.885 s … 26.340 s 3 runs
Benchmark 2: DOCUSAURUS_FASTER=true yarn build-demo
Time (mean ± σ): 9.726 s ± 0.063 s [User: 16.771 s, System: 2.176 s]
Range (min … max): 9.661 s … 9.787 s 3 runs
Summary
DOCUSAURUS_FASTER=true yarn build-demo ran
2.68 ± 0.03 times faster than DOCUSAURUS_FASTER=false yarn build-demo
Rebuilds - a bit slower (for now) but acceptable
DOCUSAURUS_FASTER=false yarn build-demo
hyperfine --runs 3 'DOCUSAURUS_FASTER=false yarn build-demo' 'DOCUSAURUS_FASTER=true yarn build-demo'
Benchmark 1: DOCUSAURUS_FASTER=false yarn build-demo
Time (mean ± σ): 8.134 s ± 1.780 s [User: 8.932 s, System: 1.315 s]
Range (min … max): 7.032 s … 10.188 s 3 runs
Benchmark 2: DOCUSAURUS_FASTER=true yarn build-demo
Time (mean ± σ): 10.235 s ± 0.553 s [User: 16.756 s, System: 2.246 s]
Range (min … max): 9.836 s … 10.867 s 3 runs
Summary
DOCUSAURUS_FASTER=false yarn build-demo ran
1.26 ± 0.28 times faster than DOCUSAURUS_FASTER=true yarn build-demo
Visit the preview URL for this PR (updated for commit e6ef3c4):
https://docusaurus-openapi-36b86--pr1003-m7ftbvnh.web.app
(expires Wed, 04 Dec 2024 14:31:52 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Sign: bf293780ee827f578864d92193b8c2866acd459f
v3.6 is out: https://docusaurus.io/blog/releases/3.6
PR ready to review
I kept the former ^3.5.0 range you used, I don't think it's necessary to require a newer version of Docusaurus.
Note the HTML minifier reports a few errors on the demo site, you might want to investigate those so that plugin users do not get invalid markup + the console errors.
See also https://github.com/facebook/docusaurus/discussions/10580