You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ctakes.apache.org by "Sean Finan (Jira)" <ji...@apache.org> on 2022/12/20 20:40:00 UTC

[jira] [Resolved] (CTAKES-531) String.replaceAll() has bad performance against replace() if not regex.

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

Sean Finan resolved CTAKES-531.
-------------------------------
    Fix Version/s: future enhancement
       Resolution: Fixed

replaced

> String.replaceAll() has bad performance against replace() if not regex.
> -----------------------------------------------------------------------
>
>                 Key: CTAKES-531
>                 URL: https://issues.apache.org/jira/browse/CTAKES-531
>             Project: cTAKES
>          Issue Type: Bug
>            Reporter: bd2019us
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: future enhancement
>
>         Attachments: 1.patch
>
>
> Location: 
> (1) ctakes-core/src/main/java/org/apache/ctakes/core/cc/html/HtmlTextWriter.java
> (2) ctakes-gui/src/main/java/org/apache/ctakes/gui/dictionary/util/FileUtil.java
>  
> The String.replaceAll(regex, other) can replace the string satisfying the "regex" with the given "other" string. However, if the given "regex" is a simple plain string (i.e., no special characters), another API String.replace(origin, other) is recommended as the former need to be compiled a head of time, which will cause additional overhead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)