Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7022186

(proxy) Proxy should use CHM to reduce contention on the loaderToCache map

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 7
    • core-libs

      A DESCRIPTION OF THE REQUEST :
      Integrate the small change in ConcurrentProxy from the commons-reflect library (from http://commons-reflect.sf.net ).

      java.lang.Proxy.getProxyClass(..) is a weak spot in any JVM using many Proxy classes (jboss, spring, etc etc) and can quickly jam the JVM up with thread contention.

      ConcurrentProxy successfully removes this bottleneck.

      See http://commons-reflect.sourceforge.net/xref/no/sesat/commons/reflect/ConcurrentProxy.html

      All it does is introduce a "loaderToCache" map and a read/write lock around it.
      Using this to <map a class loader to the proxy class cache for that loader> the hard synchronization block can be replaced the read/write locking pattern.


      JUSTIFICATION :

      java.lang.Proxy.getProxyClass(..) is a weak spot in any JVM using many Proxy classes (jboss, spring, etc etc) and can quickly jam the JVM up with thread contention.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Non blocking reads of Proxy.getProxyClass(..)
      ACTUAL -
      Blocking reads of Proxy.getProxyClass(..)
       and a jammed up JVM.

      ---------- BEGIN SOURCE ----------
      http://commons-reflect.sourceforge.net/xref/no/sesat/commons/reflect/ConcurrentProxy.html
      ---------- END SOURCE ----------

            mchung Mandy Chung (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: