groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wagenleitner (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GROOVY-7873) Regression performance issue in string methods
Date Sat, 25 Jun 2016 05:38:16 GMT

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

John Wagenleitner resolved GROOVY-7873.
---------------------------------------
       Resolution: Fixed
         Assignee: John Wagenleitner
    Fix Version/s: 2.4.8

Thanks for reporting the issue.

A work-around until the next release would be to call toString on the gstr before calling
stripMargin or stripIndent.

> Regression performance issue in string methods
> ----------------------------------------------
>
>                 Key: GROOVY-7873
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7873
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.7
>            Reporter: Tadas Krivickas
>            Assignee: John Wagenleitner
>            Priority: Critical
>             Fix For: 2.4.8
>
>         Attachments: test.groovy
>
>
> Starting with 2.4.7, performance in string processing (in certain scenarios) has decreased
dramatically. Specifically, it happens when using {{stripMargin()}} on a {{GString}} that
has a variable substitution with a huge String value. In our app performance decrease was
from tens of miliseconds to 1+ minute. 
> I suspect the latest refactoring in string methods.
> Attaching a test case.
> {code}
> R2D2:groovystrperf tadaskay$ /usr/local/Cellar/groovy/2.4.7/bin/groovy test.groovy
> Took 1456 ms
> R2D2:groovystrperf tadaskay$ /usr/local/Cellar/groovy/2.4.5/bin/groovy test.groovy
> Took 43 ms
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message