Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6992

Reduce object creation and wasted memory in Url toString() methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 10.0.0-M1, 9.11.0
    • 10.0.0-M1, 9.11.0
    • None
    • None

    Description

      The processing for toString() in the Url class is a bit expensive. I think we can do better by using String concatenation, avoiding copying byte[]/char[] arrays, and sizing StringBuilders effectively.

      More could be done to improve this, but these changes are not too aggressive. Ideally a common StringBuilder would be passed around, like the charset, to accumulate the String as processing is done.

      Attachments

        Activity

          People

            bitstorm Andrea Del Bene
            bitstorm Andrea Del Bene
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: