-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: bump docusaurus to canary verison #428
Conversation
Signed-off-by: Ryan Wang <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Thanks for trying it @ruibaby I'm a bit disappointed by the limited gain here 😅 it should be even faster. Can you please run a faster build with Also added some troubleshooting notes here: |
Hi @slorber Thanks for following up. I tested again with a cold build and logger enabled, and here are the results: cold builds: ❯ hyperfine --prepare 'pnpm clear' --runs 5 'DOCUSAURUS_FASTER=false pnpm build' 'DOCUSAURUS_FASTER=true pnpm build'
Benchmark 1: DOCUSAURUS_FASTER=false pnpm build
Time (mean ± σ): 70.715 s ± 17.150 s [User: 134.096 s, System: 31.651 s]
Range (min … max): 52.330 s … 88.497 s 5 runs
Benchmark 2: DOCUSAURUS_FASTER=true pnpm build
Time (mean ± σ): 30.094 s ± 4.572 s [User: 64.061 s, System: 28.384 s]
Range (min … max): 25.832 s … 37.655 s 5 runs
Summary
DOCUSAURUS_FASTER=true pnpm build ran
2.35 ± 0.67 times faster than DOCUSAURUS_FASTER=false pnpm build logger enabled: ❯ DOCUSAURUS_FASTER=true DOCUSAURUS_PERF_LOGGER=true pnpm build
> @halo-dev/[email protected] build /Users/ryanwang/Workspace/github/ruibaby/docs
> docusaurus build
[PERF] Get locales to build - 130.58 ms
[INFO] [zh-Hans] Creating an optimized production build...
[PERF] Build > zh-Hans > Load site > Load plugins > Init plugins - 149.13 ms
[PERF] Build > zh-Hans > Load site > Load plugins > Load plugins content > Load classic@default > translatePluginContent() - 7.94 ms
[PERF] Build > zh-Hans > Load site > Load plugins > Load plugins content > Load google-gtag@default - 8.30 ms
[PERF] Build > zh-Hans > Load site > Load plugins > Load plugins content > Load pages@default > loadContent() - 9.15 ms
[PERF] Build > zh-Hans > Load site > Load plugins > Load plugins content > Load classic@default - 12.37 ms
[PERF] Build > zh-Hans > Load site > Load plugins > Load plugins content > Load pages@default - 12.65 ms
[PERF] Build > zh-Hans > Load site > Load plugins > Load plugins content > Load docs@default > loadContent() - 4.17 seconds!
[PERF] Build > zh-Hans > Load site > Load plugins > Load plugins content > Load docs@default > contentLoaded() - 40.46 ms
[PERF] Build > zh-Hans > Load site > Load plugins > Load plugins content > Load docs@default - 4.21 seconds!
[PERF] Build > zh-Hans > Load site > Load plugins > Load plugins content - 4.21 seconds!
[PERF] Build > zh-Hans > Load site > Load plugins - 4.37 seconds!
[PERF] Build > zh-Hans > Load site > Create site files - 28.67 ms
[PERF] Build > zh-Hans > Load site - 4.40 seconds!
[PERF] Build > zh-Hans > Creating rspack bundler configs - 70.99 ms
● ━━━━━━━━━━━━━━━━━━━━━━━━━ (8%) setup compilation
● Client ━━━━━━━━━━━━━━━━━━━━━━━━━ (100%) emitting after emit [PERF] Build > zh-Hans > Bundling with rspack - 6.86 seconds!
[PERF] Build > zh-Hans > SSG > Load App renderer > Server bundle size = 2.418 MB
[PERF] Build > zh-Hans > SSG > Load App renderer > Evaluate server bundle - 57.41 ms
[PERF] Build > zh-Hans > SSG > Load App renderer - 58.15 ms
[PERF] Build > zh-Hans > SSG > Generate static files - 4.98 seconds!
[PERF] Build > zh-Hans > SSG - 5.04 seconds!
[PERF] Build > zh-Hans > Deleting server bundle - 32.12 ms
[PERF] Build > zh-Hans > postBuild() - 60.33 ms
[WARNING] Docusaurus found broken anchors!
Please check the pages of your site in the list below, and make sure you don't reference any anchor that does not exist.
Note: it's possible to ignore broken anchors with the 'onBrokenAnchors' Docusaurus configuration, and let the build pass.
Exhaustive list of all broken anchors found:
- Broken anchor on source page path = /2.16/developer-guide/plugin/publish:
-> linking to /2.16/developer-guide/plugin/introduction#%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6
- Broken anchor on source page path = /2.17/developer-guide/plugin/publish:
-> linking to /2.17/developer-guide/plugin/introduction#%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6
- Broken anchor on source page path = /2.18/developer-guide/plugin/publish:
-> linking to /2.18/developer-guide/plugin/introduction#%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6
- Broken anchor on source page path = /2.19/developer-guide/plugin/publish:
-> linking to /2.19/developer-guide/plugin/introduction#%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6
- Broken anchor on source page path = /2.20.0-SNAPSHOT/developer-guide/plugin/publish:
-> linking to /2.20.0-SNAPSHOT/developer-guide/plugin/introduction#%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6
- Broken anchor on source page path = /developer-guide/plugin/publish:
-> linking to /developer-guide/plugin/introduction#%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6
[PERF] Build > zh-Hans > Broken links checker - 65.01 ms
[SUCCESS] Generated static files in "build".
[PERF] Build > zh-Hans - 16.53 seconds!
[PERF] Build - 16.53 seconds!
[INFO] Use `npm run serve` command to test your build locally. |
Ah 😄 didn't see the missing clear preparation command. So, it's 2.35 faster in the end. Could be better but already a significant improvement! Are you building multiple locales? Because the log shows it builds in 16s for |
@slorber Thanks to the work of docusaurus and rspack teams, the build is much faster now. Previously, we had to delete some old versions of documents due to the build speed issue. There is also a problem with the zoom image plugin, because it limits the version number of docusaurus. We will merge this PR when docusaurus releases 3.6. Thanks also to @hardfist for his effort at hardfist/docusaurus-rspack#1, which made it possible to integrate rspack into docusaurus. |
Currently we only have zh-Hans |
Thanks I find it weird if you have 1 locale that hyperfine reports I don't know what's the problem with image zoom but it's not a core Docusaurus plugin so we are not really responsible for it 😅 |
Yeah, I know the reason. Because this community plugin sets peerDependencies in package.json, the current canary version does not meet its expectations and fails to compile. https://github.com/gabrielcsapo/docusaurus-plugin-image-zoom/blob/main/package.json#L39 |
I see thanks. I'll look for a solution to this canary adoption problem, not the first time it came up. |
FYI canaries start with 3.5.2 (latest version) now, so I guess it should work better with community plugins now. |
Signed-off-by: Ryan Wang <[email protected]>
/unhold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
All is well, this PR will be merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: guqing, JohnNiang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Support for building projects via rspack has been added in the latest Canary version of Docusaurus, which significantly improves compilation speed.
see: facebook/docusaurus#10556 (comment)