Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2931

DefaultThreadFactory: thread name uses StringBuilder inefficiently

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 5.5.0, 5.4.10
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Method getThreadName() creates a StringBuilder with a capacity that's too small and need to be increased, causing an allocation and copy.

      Fix: create a StringBuilder with sufficient capacity, or use String.format(). Also, merge getThreadName() and getNewThreadName().

      Todo: look at all uses of StringBuilder

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: