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

StringGroovyMethods improve performance

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.7
    • Component/s: groovy-runtime
    • Labels:
      None

      Description

      StringGroovyMethods has many issue:
      1) Inefficient converting CharSequence to String. If do not convert, the method of CharSequence wiil twice faster.
      2) IOGroovyMethods.readLines is slow, do not use it. readLines use a closue!
      3) the methods of center/denormalize/expand/pad/strip are Inefficient, there is no need creat so many StringBuilders
      I'll fix this (on github) in a few days. Please help me check and merge it.

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              wonder365 lwh
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: