Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Disable the progress bar for production build by default.

  • In small and medium applications, Rspack builds fast enough that we usually don't need to render the progress bar.
  • In large applications, rendering the progress bar will increase the build time by 1% to 10%, so we prefer to disable the progress bar by default.
  • I am also not satisfied with the current progress bar style, it is not elegant enough and may be interrupted by the log output during the build process.

Performance

Tested in https://github.com/rspack-contrib/build-tools-performance.

20k modules

hyperfine --warmup 2 --runs 4  'CASE=large PROGRESS=true node --run build:rsbuild'  'CASE=large node --run build:rsbuild'

Benchmark 1: CASE=large PROGRESS=true node --run build:rsbuild
  Time (mean ± σ):      1.681 s ±  0.008 s    [User: 6.291 s, System: 2.584 s]
  Range (min … max):    1.670 s …  1.689 s    4 runs
 
Benchmark 2: CASE=large node --run build:rsbuild
  Time (mean ± σ):      1.543 s ±  0.038 s    [User: 6.142 s, System: 2.486 s]
  Range (min … max):    1.507 s …  1.591 s    4 runs
 
Summary
  CASE=large node --run build:rsbuild ran
    1.09 ± 0.03 times faster than CASE=large PROGRESS=true node --run build:rsbuild

2.5k modules

hyperfine --warmup 2 --runs 4  'CASE=small PROGRESS=true node --run build:rsbuild'  'CASE=small node --run build:rsbuild'

Benchmark 1: CASE=small PROGRESS=true node --run build:rsbuild
  Time (mean ± σ):     434.2 ms ±   4.1 ms    [User: 1064.5 ms, System: 449.2 ms]
  Range (min … max):   430.5 ms … 438.8 ms    4 runs
 
Benchmark 2: CASE=small node --run build:rsbuild
  Time (mean ± σ):     428.8 ms ±   3.0 ms    [User: 1060.8 ms, System: 452.3 ms]
  Range (min … max):   426.1 ms … 431.5 ms    4 runs
 
Summary
  CASE=small node --run build:rsbuild ran
    1.01 ± 0.01 times faster than CASE=small PROGRESS=true node --run build:rsbuild

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@chenjiahan chenjiahan added this to the 1.4.0 milestone Jun 1, 2025
Copilot AI review requested due to automatic review settings June 1, 2025 14:08
@netlify
Copy link

netlify bot commented Jun 1, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 737512f
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/683d04c29f29af00084dadab
😎 Deploy Preview https://deploy-preview-5342--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 72 (🟢 up 3 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR disables the progress bar by default and updates related docs, types, plugins, and tests to reflect the new behavior.

  • Change default progressBar value from production-only to false
  • Update documentation (EN/ZH) and type definitions with @default false
  • Remove implicit ProgressPlugin from default setup and snapshots

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/docs/zh/config/dev/progress-bar.mdx Update default to false and refresh examples
website/docs/en/config/dev/progress-bar.mdx Update default to false, adjust wording and examples
packages/core/src/types/config.ts Add @default false to progressBar JSDoc
packages/core/src/plugins/progress.ts Remove fallback enabling logic for production mode
packages/core/src/provider/createCompiler.ts Wrap run hook to emit start log before version debug log
packages/core/tests/snapshots/default.test.ts.snap Remove ProgressPlugin entry from default snapshot
e2e/cases/server/multi-server/index.test.ts Drop explicit progressBar: false settings in tests
Comments suppressed due to low confidence (2)

website/docs/en/config/dev/progress-bar.mdx:17

  • Update or remove this sentence, as the default behavior is now false rather than production-only.
By default, Rsbuild only enables the progress bar when production building.

packages/core/tests/snapshots/default.test.ts.snap:943

  • Add a unit test to assert that ProgressPlugin is not applied by default when progressBar is undefined.
ProgressPlugin {

@chenjiahan chenjiahan merged commit 3f2db13 into main Jun 2, 2025
11 checks passed
@chenjiahan chenjiahan deleted the disable_progress_bar_0601 branch June 2, 2025 02:02
@chenjiahan chenjiahan mentioned this pull request Jun 2, 2025
@chenjiahan chenjiahan mentioned this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant