You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "kzhunmax (via GitHub)" <gi...@apache.org> on 2026/07/26 21:26:12 UTC
[PR] LANG-1830 Avoid repeated regex compilation in ClassUtils.toCleanName() [commons-lang]
kzhunmax opened a new pull request, #1754:
URL: https://github.com/apache/commons-lang/pull/1754
## Summary
Replace the repeated use of String.matches() in ClassUtils.toCleanName()
with a precompiled static Pattern.
### Motivation
String.matches() recompiles the regular expression on every invocation.
Reusing a compiled Pattern avoids this overhead while preserving the
existing behavior.
A local JMH benchmark showed approximately 4x-9x higher throughput for
the validation step after this change.
Related: LANG-1830
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LANG-1830] Avoid repeated regex compilation in ClassUtils.toCleanName() [commons-lang]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1754:
URL: https://github.com/apache/commons-lang/pull/1754#issuecomment-5085759173
Thank you @kzhunmax , merged 🚀 Since this is a simple and straightforward conversion, a JMH benchmark is not required for inclusion in this PR. For other non-trivial claims, we would want to verify and weight any such claim.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] LANG-1830 Avoid repeated regex compilation in ClassUtils.toCleanName() [commons-lang]
Posted by "kzhunmax (via GitHub)" <gi...@apache.org>.
kzhunmax commented on PR #1754:
URL: https://github.com/apache/commons-lang/pull/1754#issuecomment-5085488223
The Jira ticket is [LANG-1830](https://issues.apache.org/jira/browse/LANG-1830)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LANG-1830] Avoid repeated regex compilation in ClassUtils.toCleanName() [commons-lang]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory merged PR #1754:
URL: https://github.com/apache/commons-lang/pull/1754
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org