Skip to content

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

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

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

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented May 17, 2026

Summary

This PR removes the Rslib 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
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

Removes the process.title = 'rslib-node' assignment from the Rslib CLI startup path to eliminate the synchronous native overhead it incurs, mirroring the equivalent optimization made in Rsbuild (#7657).

Changes:

  • Drop the process.title assignment and its accompanying comment from runCLI().

@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 Timeless0911 May 18, 2026 03:26
@chenjiahan chenjiahan enabled auto-merge (squash) May 18, 2026 03:27
@chenjiahan chenjiahan merged commit 7a12dd7 into main May 18, 2026
10 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/remove-process-title branch May 18, 2026 03:57
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