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

JSAdapter overrides impacts strongly construction time

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • 8
    • core-libs
    • b89
    • Not verified

    Description

      In order to avoid relink of JSAdapter based instance (nodejar Buffer) method calls, we have migrated all properties and functions to the overrides. The overrides has grown from 8 properties to 40 properties.

      Now we don't have missed call sites but very slow creation time. We have an impact on all usage of Buffer.

      I have attached a nashorn testcase that shows that construction time of an instance is 10x slower.
      1) Run it: java jdk.nashorn.tools.Shell slow-adapter
      2) Should take around 9sec to create 100000 instances.
      3) Uncomment the properties in overrides.
      4) Run it again, should take more than 100secs.

      Time is spent in the NativeJSAdapter constructor when adding Spill properties (StandardMethodHandleFunctionality.arrayElementGetter). I have attached a jvisualvm/netbeans profiler snapshot.

      More details on perf analysis: https://kenai.com/projects/nodejs/pages/Perf_18_April_2013


      Attachments

        Activity

          People

            sundar Sundararajan Athijegannathan
            jfdenise Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: