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

Object.defineProperty performance issue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • core-libs
    • None
    • b100
    • generic
    • generic

    Description

      Object.defineProperty is ultra slow. Test case attached. I am adding 1 property to a fresh object 3000000 times. It takes 20 seconds with Object.defineProperty, 0.8 sec without.

      90% of the time is spent in jdk.nashorn.internal.runtime.ScriptObject.deleteObject (called from jdk.nashorn.internal.objects.NativeObject.defineProperty) although my objects are fresh, no state to delete (I guess).

      Attachments

        Activity

          People

            jlaskey Jim Laskey
            jfdenise Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: