fix: Speed up startup time from 5s -> 10ms (500x faster)#557
Conversation
|
@race-of-sloths include |
|
@frol Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: executed
Your contribution is much appreciated with a final score of 13! @r-near received 25 Sloth Points for reviewing and scoring this pull request. Congratulations @frol! Your PR was highly scored and you completed another monthly streak! To keep your monthly streak make another pull request next month and get 8+ score for it What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce CLI startup time by replacing the clap dependency with a fork (fast_clap) that includes an upstream-unaccepted performance fix.
Changes:
- Replace
clapwithfast_clapinCargo.toml. - Update
Cargo.lockto removeclap/clap_deriveand addfast_clap/fast_clap_derive.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Cargo.toml | Swaps the CLI argument parsing dependency from clap to fast_clap. |
| Cargo.lock | Regenerates the lockfile to reflect the new fast_clap dependency graph. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🥁 Score it! @r-near, please score the PR with |
|
@race-of-sloths 13 for all the |
Unblock #408, see #408 (comment)
clap-rs/clap#6225 was not accepted to the upstream, so I forked clap into a drop-in replacement fast_clap with the fix that allows us to make the CLI to run instantaneously.
On my MacBook M1 Pro the release CLI start time dropped from 5 seconds to 10 milliseconds. There are no side effects, so it is just faster and no downsides.