Skip to content

feat(config): update default performance budgets#13717

Merged
chenjiahan merged 4 commits intomainfrom
chenjiahan/feat-performance-budget-defaults
Apr 16, 2026
Merged

feat(config): update default performance budgets#13717
chenjiahan merged 4 commits intomainfrom
chenjiahan/feat-performance-budget-defaults

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Apr 16, 2026

Summary

Update the default performance budgets to 300 * 1024 for maxAssetSize and 500 * 1024 for maxEntrypointSize so the defaults better fit modern applications and distinguish asset vs entrypoint limits.

Checklist

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

@chenjiahan chenjiahan requested a review from hardfist as a code owner April 16, 2026 03:34
Copilot AI review requested due to automatic review settings April 16, 2026 03:34
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 16, 2026

Deploying rspack with  Cloudflare Pages  Cloudflare Pages

Latest commit: c3bd07b
Status: ✅  Deploy successful!
Preview URL: https://5c93bad2.rspack-v2.pages.dev
Branch Preview URL: https://chenjiahan-feat-performance.rspack-v2.pages.dev

View logs

Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

Updates Rspack’s default performance budget thresholds to better match modern bundle sizes, and ensures documentation/types/tests reflect the new defaults while keeping performance hint fixtures stable.

Changes:

  • Updated default performance.maxAssetSize / maxEntrypointSize to 300 * 1024 and 500 * 1024.
  • Refreshed surfaced defaults in English/Chinese docs and config type docs.
  • Pinned explicit budgets in performance-related stats fixtures to keep warning/error behavior tests deterministic.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
website/docs/zh/config/performance.mdx Updates displayed default values for performance budget options (ZH).
website/docs/en/config/performance.mdx Updates displayed default values for performance budget options (EN).
tests/rspack-test/statsOutputCases/preset-normal-performance/rspack.config.js Pins explicit budgets to keep performance warning fixture stable.
tests/rspack-test/statsOutputCases/preset-normal-performance-ensure-filter-sourcemaps/rspack.config.js Pins explicit budgets to keep performance warning fixture stable (sourcemaps).
tests/rspack-test/statsOutputCases/performance-oversize-limit-error/rspack.config.js Pins explicit budgets for the error-hints fixture.
tests/rspack-test/statsOutputCases/performance-no-hints/rspack.config.js Pins explicit budgets for the no-hints fixture (avoid inheriting global defaults).
tests/rspack-test/statsOutputCases/performance-no-async-chunks-shown/rspack.config.js Pins explicit budgets for async-chunk related output fixture.
tests/rspack-test/statsOutputCases/performance-error/rspack.config.js Pins explicit budgets for the error-hints fixture.
tests/rspack-test/statsOutputCases/performance-different-mode-and-target/rspack.config.js Pins explicit budgets across multiple target/mode configurations.
tests/rspack-test/defaultsCases/mode/undefined.js Updates defaults snapshot to new computed budget values.
tests/rspack-test/defaultsCases/mode/production.js Updates defaults snapshot to new computed budget values.
packages/rspack/src/config/types.ts Updates documented defaults in the Performance type docs.
packages/rspack/src/config/defaults.ts Implements the new default budget values in config defaults.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread website/docs/en/config/performance.mdx Outdated
Comment thread website/docs/en/config/performance.mdx Outdated
Comment thread website/docs/zh/config/performance.mdx Outdated
Comment thread website/docs/zh/config/performance.mdx Outdated
Comment thread packages/rspack/src/config/types.ts Outdated
Comment thread packages/rspack/src/config/types.ts Outdated
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

📦 Binary Size-limit

Comparing f9f6be3 to fix(esm-library): deconflict module external helper names (#13695) by Fy

🎉 Size decreased by 7.72KB from 49.39MB to 49.39MB (⬇️0.02%)

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Apr 16, 2026

This comment was marked as resolved.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 16, 2026

Merging this PR will degrade performance by 4.44%

⚡ 1 improved benchmark
❌ 3 regressed benchmarks
✅ 24 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation rust@persistent_cache_restore_after_single_file_change@basic-react-development 27.8 ms 29.1 ms -4.44%
Simulation bundle@basic-react-development 343.6 ms 347.1 ms -1.01%
Simulation rust@concatenate_module_code_generation 139.8 ms 137.6 ms +1.58%
Simulation rust@persistent_cache_restore@basic-react-development 25.7 ms 26.8 ms -4.32%

Comparing chenjiahan/feat-performance-budget-defaults (f9f6be3) with main (3d76b2b)

Open in CodSpeed

@github-actions
Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 6 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
popular-libs 1.7 MB 0
react-10k 5.7 MB 0
react-1k 826.1 KB 0
react-5k 2.7 MB 0
rome 984.1 KB 0
ui-components 5.0 MB 0

Generated by Rsdoctor GitHub Action

@chenjiahan chenjiahan merged commit b202218 into main Apr 16, 2026
35 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/feat-performance-budget-defaults branch April 16, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants