Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7873

Regression performance issue in string methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.4.7
    • 2.4.8
    • None
    • None

    Description

      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.

      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
      

      Attachments

        1. test.groovy
          25 kB
          Tadas Krivickas

        Issue Links

          Activity

            People

              jwagenleitner John Wagenleitner
              tadaskay Tadas Krivickas
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: