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

Avoid initializing volatile fields to their default values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.13.3
    • 2.14.0
    • Core
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: