Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-772

Performance enhancement: ParameterizedMessage should not take String snapshots of its parameters in constructor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Resolved
    • 2.0, 2.0.1
    • 2.6
    • API

    Description

      Discovered during investigation for LOG4J2-763, ParameterizedMessage currently initializes its String[] stringArgs field in the constructor. This may be wasted work if the message is not used, for example because the log level is below the filter threshold.

      The stringArgs field should be initialized in the getFormattedString method, not earlier.

      Attachments

        Issue Links

          Activity

            People

              rpopma Remko Popma
              rpopma Remko Popma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: