Skip to content

perf(cli): remove process title startup overhead#1268

Merged
9aoy merged 1 commit into
mainfrom
chenjiahan/remove-process-title
May 18, 2026
Merged

perf(cli): remove process title startup overhead#1268
9aoy merged 1 commit into
mainfrom
chenjiahan/remove-process-title

Conversation

@chenjiahan

@chenjiahan chenjiahan commented May 17, 2026

Copy link
Copy Markdown
Member

Summary

This PR removes the Rstest CLI startup code that updates process.title. Updating the process title is a synchronous native operation and adds measurable overhead for short-lived CLI commands, while the title is not required for CLI correctness.

The equivalent Rsbuild change improved rsbuild build by 18.501 ms mean time in a 30-run react-1k benchmark and by 10.018 ms mean time in an 80-run benchmark.

Related Links

web-infra-dev/rsbuild#7657
nodejs/node#59678

Checklist

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

Copilot AI review requested due to automatic review settings May 17, 2026 01:12

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.

Pull request overview

Removes the process.title = 'rstest-node' assignment from the CLI entry to eliminate measurable startup overhead, mirroring an equivalent Rsbuild change.

Changes:

  • Drop the process.title assignment and its comment in runCLI.

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

@github-actions

Copy link
Copy Markdown

Rsdoctor Bundle Diff Analysis

Found 12 projects in monorepo, 1 project with changes.

📊 Quick Summary
Project Total Size Change
adapter-rsbuild 3.7 KB 0
adapter-rslib 24.7 KB 0
adapter-rspack 7.8 KB 0
browser 2.0 MB 0
browser-react 3.7 KB 0
browser-ui 803.5 KB 0
coverage-istanbul 9.6 KB 0
core/browser 970.0 KB 0
core/loaders 869.0 B 0
core/main 1.7 MB -35.0 B (-0.0%)
vscode/extension 26.9 MB 0
vscode/worker 14.4 KB 0
📋 Detailed Reports (Click to expand)

📁 core/main

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

📌 Baseline Commit: 2690a8bbe3 | PR: #1265

Metric Current Baseline Change
📊 Total Size 1.7 MB 1.7 MB -35.0 B (-0.0%)
📄 JavaScript 1.6 MB 1.6 MB -35.0 B (-0.0%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 81.6 KB 81.6 KB 0

📦 Download Diff Report: core/main Bundle Diff

Generated by Rsdoctor GitHub Action

@chenjiahan chenjiahan changed the title fix(cli): remove process title startup overhead perf(cli): remove process title startup overhead May 17, 2026
@chenjiahan chenjiahan requested a review from 9aoy May 18, 2026 03:26
@9aoy 9aoy merged commit c5aecc3 into main May 18, 2026
13 checks passed
@9aoy 9aoy deleted the chenjiahan/remove-process-title branch May 18, 2026 03:30
@9aoy 9aoy mentioned this pull request May 20, 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.

3 participants