Skip to content

perf(core): split browser runtime vendor chunk - #1625

Merged
9aoy merged 1 commit into
mainfrom
9aoy/perf-browser-runtime-chunks
Jul 27, 2026
Merged

perf(core): split browser runtime vendor chunk#1625
9aoy merged 1 commit into
mainfrom
9aoy/perf-browser-runtime-chunks

Conversation

@9aoy

@9aoy 9aoy commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Extract stable assertion and browser-polyfill dependencies from the eager browser runtime into a fully minified vendor chunk while preserving the existing lazy snapshot, fake-timers, and magic-string boundaries.
  • Emit the Rspack runtime separately to avoid a circular ESM initialization dependency between the runtime and vendor chunks.
  • In same-environment builds, eager browser runtime JS decreases from 553.0 kB to 317.3 kB (-42.6%) and from 103.6 kB to 82.3 kB gzip (-20.6%); total browser runtime gzip decreases from 143.9 kB to 117.9 kB (-18.1%).

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings July 27, 2026 06:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

Rsdoctor Bundle Diff Analysis

Found 13 projects in monorepo, 1 project with changes.

📊 Quick Summary
Project Total Size Change
adapter-rsbuild 6.1 KB 0
adapter-rslib 26.3 KB 0
adapter-rspack 9.2 KB 0
browser 2.1 MB 0
browser-react 6.4 KB 0
coverage-istanbul 18.8 KB 0
coverage-v8 80.0 KB 0
browser-ui 811.2 KB 0
playwright 47.6 KB 0
core/browser 576.4 KB 📉 -247.4 KB (-30.0%)
core/main 1.7 MB 0
vscode/worker 14.8 KB 0
vscode/extension 47.4 MB 0
📋 Detailed Reports (Click to expand)

📁 core/browser

Path: packages/core/.rsdoctor/browser/rsdoctor-data.json

📌 Baseline Commit: 920421956c | PR: #1624

Metric Current Baseline Change
📊 Total Size 576.4 KB 823.8 KB -247.4 KB (-30.0%)
📄 JavaScript 435.0 KB 682.3 KB -247.4 KB (-36.3%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 141.4 KB 141.4 KB 0

📦 Download Diff Report: core/browser Bundle Diff

Generated by Rsdoctor GitHub Action

@9aoy
9aoy merged commit d4d44bb into main Jul 27, 2026
11 checks passed
@9aoy
9aoy deleted the 9aoy/perf-browser-runtime-chunks branch July 27, 2026 07:20
@9aoy 9aoy mentioned this pull request Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants