Skip to content
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

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

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Jan 19, 2022

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
Copy link
Member Author

bagder commented Jan 19, 2022

I ran into this bug with #8300

@bagder bagder closed this in fde0925 Jan 19, 2022
@bagder bagder deleted the bagder/gen-references branch Jan 19, 2022
emilengler added a commit to emilengler/curl that referenced this pull request Jul 30, 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 commit author thinks, that the terrible performance comes from some
low-level locale checks regarding the use of "\W" in a regular
expression.

This commit replaces the "\W" with [^a-zA-Z0-9_], which is, according to
regex101.com, functionally equivalent to the previous operation, except
that it is obviously limited to ASCII, which is fine, as the curl
project is English-only anyway.

See curl#8299
Fixes curl#9230
Closes #XXXX
emilengler added a commit to emilengler/curl that referenced this pull request Jul 30, 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 commit author thinks, that the terrible performance comes from some
low-level locale checks regarding the use of "\W" in a regular
expression.

This commit replaces the "\W" with [^a-zA-Z0-9_], which is, according to
regex101.com, functionally equivalent to the previous operation, except
that it is obviously limited to ASCII, which is fine, as the curl
project is English-only anyway.

See curl#8299
Fixes curl#9230
Closes curl#9232
emilengler added a commit to emilengler/curl that referenced this pull request Jul 31, 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 commit author thinks, that the terrible performance comes from some
low-level locale checks regarding the use of "\W" in a regular
expression.

This commit replaces the "\W" with [^a-zA-Z0-9_], which is, according to
regex101.com, functionally equivalent to the previous operation, except
that it is obviously limited to ASCII, which is fine, as the curl
project is English-only anyway.

Co-authored-by: Emanuele Torre <torreemanuele6@gmail.com>

See curl#8299
Fixes curl#9230
Closes curl#9232
emilengler added a commit to emilengler/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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant