Uploaded image for project: 'James Mime4j'
  1. James Mime4j
  2. MIME4J-306

MimeUtil::unfold should group char appends

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.5
    • 0.8.6
    • core
    • None

    Description

      Calling repeatedly append requires ensuring the capacity amongst other.

      Appends to the string builder can be done for all previous chars when a line delimiter is encountered, thus reducing the cost of the operation.

      Gain: 66%

      Attached are the flame graphs:

      Attachments

        1. before_unfold.png
          275 kB
          Benoit Tellier
        2. after_unfold.png
          213 kB
          Benoit Tellier

        Activity

          People

            Unassigned Unassigned
            btellier Benoit Tellier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h