Object.defineProperty performance issue

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b100
    • generic
    • generic

      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).

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

              Created:
              Updated:
              Resolved: