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

Avoid initializing volatile fields to their default values

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.13.3
    • Fix Version/s: 2.14.0
    • Component/s: Core
    • Labels:
      None

      Description

      Contribution: https://github.com/apache/logging-log4j2/pull/367

      From Turbanov Andrey:

      It's known that writing to a volatile field has performance impact.
      It's true even if code initializes field with default value.
      This PR cleans such redundant initialization and improves startup performance.
      See similar improvement in JDK codebase: https://bugs.openjdk.java.net/browse/JDK-8145680.

        Attachments

          Activity

            People

            • Assignee:
              ckozak Carter Kozak
              Reporter:
              ckozak Carter Kozak
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: