-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Use APIs that don't compile a Pattern each call #27654
Use APIs that don't compile a Pattern each call #27654
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot @alzimmermsft - worth running full live CI on this PR.
Wondering, how did you find these string pattern issues ?
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
Just prior experience with doing performance improvements in http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/lang/String.java#l2164 |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
Use APIs that don't compile a
Pattern
on each call (String.replaceAll, String.replaceFirst, String.split [when split String is > 1 character]). Uncertain if the changed code is in a hot path but the overall reduction of usingPattern.compile
should improve performance a good deal.