Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1435

Performance: avoid allocating String just to pass to trimByJustification

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Back End, Performance
    • None

    Description

      Why do we construct the string here? We could do the trim on the string buffer, (avoiding allocations), and have the trim call return the string itself. (Saves one string copy.)

      There's another place where trimByJustification is called, on the result of DataInputStream.getSomeString(...).

      Really that should return a StringBuilder so that trim can happen in-place.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: