Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-69

LogbackMDCAdapter allocates new HashMap for every MDC call

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • None
    • logback-core
    • None
    • Operating System: All
      Platform: All

    • 150

    Description

      A new HashMap is allocated in logback's MDC implementation for every call to MDC.put and MDC.remove.

      This can lead to excessive garbage collector load in performance critical code that makes very frequent use of MDC, such as asynchronous network and file IO code.

      For certain programs it is critical to have MDC capability in code hotspots, where MDC is a valuable debugging tool as applied to TRACE and DEBUG statements.

      The current implementation causes a load on the garbage collector even when logging is turned off.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            qosbugzilla@bitcount.com Matt Finn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: