[ 
https://issues.apache.org/jira/browse/CALCITE-3823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Danny Chen resolved CALCITE-3823.
---------------------------------
    Resolution: Fixed

Fixed in 
[4208d0b|https://github.com/apache/calcite/commit/4208d0ba6f2a749692fe64181a1373af07d55db5]
 !

> Do not use String.replaceAll
> ----------------------------
>
>                 Key: CALCITE-3823
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3823
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.23.0
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> We use JDK's {{String.replaceAll(String regex, String replacement)}} about 60 
> times in the code, but most of these should probably use 
> {{String.replace(CharSequence target, CharSequence replacement)}}.
> {{replaceAll}} uses regex semantics, which is slow (it compiles a pattern 
> each call) and probably not desired behavior.
> Consider adding to {{forbidden-apis/signatures.txt}} to prevent it from being 
> accidentally used in future.
> See tweet "[String.replaceAll is the most invisible java perf issue I end up 
> finding out of 
> profiles|https://twitter.com/t3rmin4t0r/status/1232353433371336704]";.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to