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

Performance: avoid allocating String just to pass to trimByJustification

XMLWordPrintableJSON

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Normal Normal
    • deferred
    • None
    • Back End, Performance
    • None

      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.

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

                Created:
                Updated: