Uploaded image for project: 'JBoss Log Manager'
  1. JBoss Log Manager
  2. LOGMGR-263

Logger Lookup is much slower as with JDK 8

XMLWordPrintable

      During upgrading a Java EE application from WildFly 13 with JDK 8 to WildFly 17 with JDK 11 we had a serious performance issue. We identified the usage of the logging framework SLF4J with the pattern `Logger log = LoggerFactory.getLogger(XXX.class)` was the reason when a lot of calls to `getLogger` occur in parallel. As workaround we added `static` to some code hotspots to get back the performance we were used to. Also WildFly 13 with JDK 8 got a performance improvement with the added `static` keyword.

      Please check the VisualVM output as prove of JDKSpecific got slower:

        1. ClassInEar.java
          0.4 kB
        2. getlogger-stack.txt
          3 kB
        3. grafik1570016303722.png
          grafik1570016303722.png
          75 kB
        4. grafik1570016303722 (1).png
          grafik1570016303722 (1).png
          75 kB
        5. grafik1570016791285.png
          grafik1570016791285.png
          50 kB
        6. LogContextCacher.java
          2 kB
        7. logger-demo.war
          5 kB
        8. responsetimes.png
          responsetimes.png
          398 kB

            jperkins-rhn James Perkins
            mobilexagmuc Andreas Liebscher (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: