Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3902

Performance - Locks in class loader

    Details

    • Flags:
      Patch

      Description

      JSONWriter is causing locks in class loader, because it always invokes Introspector.getBeanInfo(). That in turn tries to load a class with "BeanInfo" suffix in Introspector.findExplicitBeanInfo(). Such class does not exists, but we try to load it over and over again for every JSON result. Class loading involves a lock in the application server, and this causes performance issue in heavily multithreaded applications.
      This could be solved by caching the BeanInfo for the classes, for which I have created a patch.
      The issue is also mentioned here:
      http://stackoverflow.com/questions/12728860/java-performance-issue-tomcat-webappclassloader-locked

        Attachments

        1. WW-3902.diff
          3 kB
          Pelladi Gabor

          Issue Links

            Activity

              People

              • Assignee:
                lukaszlenart Lukasz Lenart
                Reporter:
                pelladi Pelladi Gabor
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: