cmdline-opts/gen.pl: fix option matching to improve references#8299
Closed
bagder wants to merge 1 commit into
Closed
cmdline-opts/gen.pl: fix option matching to improve references#8299bagder wants to merge 1 commit into
bagder wants to merge 1 commit into
Conversation
Previously it could mistakenly match partial names when there are options that start with the same prefix, leading to the wrong references used.
Member
Author
|
I ran into this bug with #8300 |
cvengler
added a commit
to cvengler/curl
that referenced
this pull request
Aug 1, 2022
On some systems, the gen.pl script takes nearly two minutes for the generation of the main-page, which is a completely unacceptable time. The slow performance has two causes: 1. Use of a regex locale operator 2. Useless invokations of loops The commit addresses the first issue by replacing the "\W" wiht [^a-zA-Z0-9_], which is, according to regex101.com, functionally equivalent to the previous operation, except that it is obviously limited to ASCII only, which is fine, as the curl project is English-only anyway. The second issue is being addressed by only running the loop if the line contains a "--" in it. The loop may be completeley removed in the future. Co-authored-by: Emanuele Torre <torreemanuele6@gmail.com> See curl#8299 Fixes curl#9230 Closes curl#9232
bagder
pushed a commit
that referenced
this pull request
Aug 2, 2022
On some systems, the gen.pl script takes nearly two minutes for the generation of the main-page, which is a completely unacceptable time. The slow performance has two causes: 1. Use of a regex locale operator 2. Useless invokations of loops The commit addresses the first issue by replacing the "\W" wiht [^a-zA-Z0-9_], which is, according to regex101.com, functionally equivalent to the previous operation, except that it is obviously limited to ASCII only, which is fine, as the curl project is English-only anyway. The second issue is being addressed by only running the loop if the line contains a "--" in it. The loop may be completeley removed in the future. Co-authored-by: Emanuele Torre <torreemanuele6@gmail.com> See #8299 Fixes #9230 Closes #9232
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously it could mistakenly match partial names when there are
options that start with the same prefix, leading to the wrong references
used.