https://issues.apache.org/bugzilla/show_bug.cgi?id=55511

            Bug ID: 55511
           Summary: Reduce contention on WebappClassLoader
           Product: Tomcat 8
           Version: 8.0.0-RC1
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: jas...@bluedevel.com

Created attachment 30789
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30789&action=edit
Patch diff to WebappClassLoader to enable concurrent read of cache

As part of this patchset -
http://svn.apache.org/viewvc?view=revision&revision=927565 - the loadClass()
method was marked synchronized, which means all class loading in a web
application is fully serialized against the class loader.

There are a number of libraries which call loadClass repeatedly (eg some
versions of Saxon XSLT engine).

Attached is a patch that alleviates some of the pressure by converting the
local cache from Hashmap to a ConcurrentHashMap and moving the cache lookup
outside the synchronized block. Thus, all class loading against this CL should
now operate concurrently. Anything requiring the superclass or parent loader is
still synchronized.

Let me know if you need some additional test metrics etc.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to