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

(proxy) Examine performance of dynamic proxy creation

    XMLWordPrintable

Details

    Description

      JDK-7123493 has improved the performance of dynamic proxy creation. The performance of dynamic proxy creation with the support of modules has to be examined and ensure the performance is comparable.

      Two issues in jigsaw m3 change:
      1) cache of proxy classes is changed from ClassLoader+interfaces to Module+interfaces.

      For each newProxyInstance invocation, it performs the mapping from ClassLoader+interfaces to Module and other required validation that incurs additional overhead.

      2) getProxyClass() is deprecated as proxy class could be strongly encapsulated in named module. It is not accessible to call Class::newInstance.

      Existing code doing its own caching of proxy classes to avoid the costs of re-validation will work if all proxy interfaces are public and exported as it is generated in an unnamed module.

      This will need to be revisited for the case when proxy class is inaccessible.

      Attachments

        Issue Links

          Activity

            People

              plevart Peter Levart
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: