Skip to content

Enable Docusaurus Faster for improved documentation build performance#18954

Merged
harupy merged 1 commit intomlflow:masterfrom
harupy:docs/enable-docusaurus-faster
Nov 21, 2025
Merged

Enable Docusaurus Faster for improved documentation build performance#18954
harupy merged 1 commit intomlflow:masterfrom
harupy:docs/enable-docusaurus-faster

Conversation

@harupy
Copy link
Member

@harupy harupy commented Nov 21, 2025

What changes are proposed in this pull request?

This PR enables Docusaurus Faster, an experimental feature announced in Docusaurus 3.6 that significantly improves documentation build performance by using Rspack (Rust-based bundler) and SWC (Speedy Web Compiler) instead of webpack and Babel.

Changes:

  • Add @docusaurus/faster dependency
  • Enable experimental_faster and v4 future flags in docusaurus.config.ts
  • Remove babel.config.js (no longer needed with SWC)
  • Suppress SSG warnings in build command for cleaner output

Build Time Comparison

Before (webpack/Babel): ~2 minutes 39 seconds

Wed, 19 Nov 2025 06:26:35 GMT > docusaurus build
Wed, 19 Nov 2025 06:26:36 GMT [INFO] [en] Creating an optimized production build...
Wed, 19 Nov 2025 06:26:39 GMT [info] [webpackbar] Compiling Client
Wed, 19 Nov 2025 06:26:39 GMT [info] [webpackbar] Compiling Server
Wed, 19 Nov 2025 06:27:24 GMT [success] [webpackbar] Server: Compiled successfully in 44.99s
Wed, 19 Nov 2025 06:28:34 GMT [success] [webpackbar] Client: Compiled successfully in 1.92m
Wed, 19 Nov 2025 06:28:54 GMT Warning:  [docusaurus-plugin-llms-txt] WARNING: Excluded 1 routes by current config
Wed, 19 Nov 2025 06:29:14 GMT [SUCCESS] [docusaurus-plugin-llms-txt] Generated copy content data file: copy-content-data.1763533598422.json
Wed, 19 Nov 2025 06:29:14 GMT [SUCCESS] [docusaurus-plugin-llms-txt] Plugin completed successfully - processed 264 documents
Wed, 19 Nov 2025 06:29:14 GMT [SUCCESS] Generated static files in "build".
Wed, 19 Nov 2025 06:29:14 GMT [INFO] Use `npm run serve` command to test your build locally.

After (Rspack/SWC): ~43 seconds (~3.7x faster)

Fri, 21 Nov 2025 09:01:39 GMT > DOCUSAURUS_IGNORE_SSG_WARNINGS=true docusaurus build
Fri, 21 Nov 2025 09:01:40 GMT [INFO] [en] Creating an optimized production build...
Fri, 21 Nov 2025 09:01:42 GMT Warning:  Docusaurus site warnings:
Fri, 21 Nov 2025 09:01:42 GMT - Your site is using the SWC js loader. You can safely remove the Babel config file at `babel.config.js`.
Fri, 21 Nov 2025 09:02:08 GMT Warning:  [docusaurus-plugin-llms-txt] WARNING: Excluded 1 routes by current config
Fri, 21 Nov 2025 09:02:22 GMT [SUCCESS] [docusaurus-plugin-llms-txt] Generated copy content data file: copy-content-data.1763715702464.json
Fri, 21 Nov 2025 09:02:22 GMT [SUCCESS] [docusaurus-plugin-llms-txt] Plugin completed successfully - processed 251 documents
Fri, 21 Nov 2025 09:02:22 GMT [SUCCESS] Generated static files in "build".
Fri, 21 Nov 2025 09:02:22 GMT [INFO] Use `npm run serve` command to test your build locally.

How is this PR tested?

  • Manual tests

Verified successful build with npm run build in the docs directory. Build completes successfully with SWC loader active and cleaner output.

Does this PR require documentation update?

  • No. You can skip the rest of this section.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section

Should this PR be included in the next patch release?

  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

🤖 Generated with Claude Code

@github-actions github-actions bot added area/build Build and test infrastructure for MLflow area/docs Documentation issues rn/none List under Small Changes in Changelogs. labels Nov 21, 2025
This commit enables Docusaurus Faster, an experimental feature that uses
Rspack (Rust-based bundler) and SWC (Speedy Web Compiler) instead of
webpack and Babel for significantly faster documentation builds.

Changes:
- Add @docusaurus/faster dependency
- Enable experimental_faster and v4 future flags in docusaurus.config.ts
- Suppress SSG warnings in build command for cleaner output

Reference: https://docusaurus.io/blog/releases/3.6

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy force-pushed the docs/enable-docusaurus-faster branch from e2e4895 to ba7bc48 Compare November 21, 2025 09:06
@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

Documentation preview for ba7bc48 is available at:

More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

"start": "docusaurus start",
"preview": "npm run build && npm run serve",
"build": "docusaurus build",
"build": "DOCUSAURUS_IGNORE_SSG_WARNINGS=true docusaurus build",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's just me but docusaurus build slows down my laptop on master and takes a few minutes.

Copy link
Collaborator

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@harupy harupy added this pull request to the merge queue Nov 21, 2025
Merged via the queue into mlflow:master with commit b65747d Nov 21, 2025
53 of 55 checks passed
@harupy harupy deleted the docs/enable-docusaurus-faster branch November 21, 2025 11:21
jimilp7 pushed a commit to backspace-org/mlflow that referenced this pull request Nov 21, 2025
…mlflow#18954)

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Tian-Sky-Lan pushed a commit to Tian-Sky-Lan/mlflow that referenced this pull request Nov 24, 2025
…mlflow#18954)

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Tian Lan <sky.blue266000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build and test infrastructure for MLflow area/docs Documentation issues rn/none List under Small Changes in Changelogs. team-review Trigger a team review request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants