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

fix: pre-compile regex for parsing kafka version #2663

Merged
merged 2 commits into from
Oct 11, 2023
Merged

fix: pre-compile regex for parsing kafka version #2663

merged 2 commits into from
Oct 11, 2023

Conversation

qshuai
Copy link
Contributor

@qshuai qshuai commented Oct 8, 2023

Fix compiling regular pattern redundantly to optimize CPU usage.

Fixes #2662

utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
@qshuai
Copy link
Contributor Author

qshuai commented Oct 11, 2023

@Gorgonx7 Thanks! I have push a new commit fixing these issues

Signed-off-by: qshuai <qishuai231@gmail.com>
Copy link
Collaborator

@dnwe dnwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this, changes look good to me

@dnwe dnwe changed the title fix: compile regex pattern redundantly when parsing kafka version(#2662) fix: pre-compile regex for parsing kafka version Oct 11, 2023
@dnwe dnwe merged commit 24f1249 into IBM:main Oct 11, 2023
12 checks passed
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.

Compiling the regular expression every time it is consumed is redundant.
3 participants