-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues 863,perf imp2,883,882,871 #893
Conversation
b256576
to
bade4c8
Compare
6277e8e
to
ec9b694
Compare
1 similar comment
ec9b694
to
f77692a
Compare
☔ The latest upstream changes (presumably #894) made this pull request unmergeable. Please resolve the merge conflicts. |
This makes a very big difference for CLIs that parse a large number of values (think ripgrep over a large directory). This commit improved the ripgrep parsing of ~2,000 values, simulating giving ripgrep a bunch of files. Parsing when from ~1,200,000 ns to ~400,000 ns! This was conducted a i7-5600U 2.6GHz
Also no need to check for Hidden inside for that already is filtered on !Hidden. Closes #882
…ened subcommands or aliases (i.e. for subcommmand "test", "t", "te", or "tes" would be allowed assuming no other ambiguities) Closes #863
…hen AppSettings::SubcommandRequiredElseHelp is used Close #883
…nly ones available are hidden Closes #882
…rgs in that section are hidden
…s are used, a new more accurate double line usage string is shown Closes #871
…'s getting very long and hard to read
… disabled and InferSubcommands is enabled
f77692a
to
9d4535e
Compare
… message for the auto-generated help/version
Changes Unknown when pulling e802a47 on issues-863,perf-imp2,883,882,871 into ** on master**. |
2 similar comments
Changes Unknown when pulling e802a47 on issues-863,perf-imp2,883,882,871 into ** on master**. |
Changes Unknown when pulling e802a47 on issues-863,perf-imp2,883,882,871 into ** on master**. |
…st' which means it should be used with `--` syntax and can be accessed early Marking a positional argument `.last(true)` will allow accessing this argument earlier if the `--` syntax is used (i.e. skipping other positional args) and also change the usage string to one of the following: * `$ prog [arg1] [-- <last_arg>]` * `$ prog [arg1] -- <last_arg>` (if the arg marked `.last(true)` is also marked `.required(true)`) Closes #888
96aad7d
to
96884aa
Compare
Cc @BurntSushi This PR adds some substantial performance gains for parsing lots of args (I.e. from things like shell globs). Parsing ~2,000 args went from taking between 1-1.2M ns to ~300k ns on my slow laptop. Cc @fnichol @homu r+3 |
📌 Commit 96884aa has been approved by |
⚡ Test exempted - status |
No description provided.