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

Reduce memory overhead using thread locals with non-reusable messages

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.13.0
    • 2.13.1
    • None
    • None

    Description

      Using ParameterizedMessageFactory (non-reusable) with thread locals for asynchronous logging results in unused object parameter arrays and empty StringBuilder buffers.
      We can update RingBufferLogEvent and MutableLogEvent to create both the StringBuilder buffer and parameter array lazily in order to avoid the memory overhead entirely when reusable messages are not used.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h

                Slack

                  Issue deployment