Repository navigation
perf: parse the command line once for the command being run - #322
Conversation
🦋 Changeset detectedLatest commit: 71bf891 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (2)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit c237754
☁️ Nx Cloud last updated this comment at |
commit: |
Merging this PR will improve performance by 19.83%
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes |
🎯 Changes
main()now gives cac only the command named by the first argument for the parse, then restores the full command list. cac parses one time. When the first argument is a flag or an unknown command, nothing changes.main()call in a fresh process is 0.19 ms faster at the minimum (1.56 ms to 1.37 ms over 40 processes each). Theloadbenchmarks, which callmain()in a warm loop, are 7% to 9% faster. Thelistscan benchmark does not change.intent help <command>, unknown commands, and exit codes are the same.dist/cli.mjsgrows by 181 bytes.✅ Checklist
pnpm run test:pr(runpnpm build:allfirst).🚀 Release Impact
Summary by CodeRabbit