Qpid
  1. Qpid
  2. QPID-3766

Cache toString() results in Address class for performance gain

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.15
    • Component/s: Java Client
    • Labels:
      None
    • Environment:

      All OS platforms.

      Description

      Address is an immutable class with a fairly expensive toString() method. Being that this class never changes we should cache this for performance improvements when running in debug/trace mode. Our internal QA department using jProfiler identified performance gains that could be made in doing this and I can't see any reason not to do so.

      1. QPID-3766.patch
        2 kB
        Weston M. Price

        Activity

        Hide
        Weston M. Price added a comment -

        Also, this class does not conform to the Apache naming conventions. This should be fixed as well.

        Show
        Weston M. Price added a comment - Also, this class does not conform to the Apache naming conventions. This should be fixed as well.
        Hide
        Weston M. Price added a comment -

        Patch for Address changes for performance improvements and conformance to Apache naming conventions.

        Show
        Weston M. Price added a comment - Patch for Address changes for performance improvements and conformance to Apache naming conventions.
        Hide
        Weston M. Price added a comment -

        Fixed with attached patch and test suite run.

        Show
        Weston M. Price added a comment - Fixed with attached patch and test suite run.

          People

          • Assignee:
            Weston M. Price
            Reporter:
            Weston M. Price
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development