Skip to content

cmdline-opts/gen.pl: fix option matching to improve references#8299

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/gen-references
Closed

cmdline-opts/gen.pl: fix option matching to improve references#8299
bagder wants to merge 1 commit into
masterfrom
bagder/gen-references

Conversation

@bagder

@bagder bagder commented Jan 19, 2022

Copy link
Copy Markdown
Member

Previously it could mistakenly match partial names when there are
options that start with the same prefix, leading to the wrong references
used.

Previously it could mistakenly match partial names when there are
options that start with the same prefix, leading to the wrong references
used.
@bagder

bagder commented Jan 19, 2022

Copy link
Copy Markdown
Member Author

I ran into this bug with #8300

@bagder bagder closed this in fde0925 Jan 19, 2022
@bagder bagder deleted the bagder/gen-references branch January 19, 2022 12:29
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant