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.

        Activity

        Hide
        pschumacher Pascal Schumacher added a comment -

        @lwh: Are you still interested in submitting the pull request or should we close this?

        Show
        pschumacher Pascal Schumacher added a comment - @lwh: Are you still interested in submitting the pull request or should we close this?
        Hide
        pschumacher Pascal Schumacher added a comment -

        I'm closing this as lwh never created the mentioned pull request. lwh: Please reopen this issue if you are still interested in submitting it. Thanks!

        Show
        pschumacher Pascal Schumacher added a comment - I'm closing this as lwh never created the mentioned pull request. lwh: Please reopen this issue if you are still interested in submitting it. Thanks!
        Hide
        paulk Paul King added a comment -

        I am going to reopen to knock off a couple of obvious improvements in SGM.

        Show
        paulk Paul King added a comment - I am going to reopen to knock off a couple of obvious improvements in SGM.
        Hide
        paulk Paul King added a comment -

        Proposed PR#341 merged

        Show
        paulk Paul King added a comment - Proposed PR#341 merged

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development