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

dust.js performance regression caused by primitive field conversion

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b43
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        A performance regression with the dust.js templating library was reported on nashorn-dev:

        http://mail.openjdk.java.net/pipermail/nashorn-dev/2014-November/003860.html

        While the original report focuses on 8u05 vs 8u25, there is even a bigger regression to 8u40. While the reasons for the 8u25 regression are not very clear, the 8u40 regression is caused by the switch to dual fields representation. The problem here is that the '$len' and '$idx' properties switch between int and Object type a lot, and since this is a get/setAttr access the property maps are not cached in the callsite.

        While it would not solve the deeper propblem with indexed access callsites, it seems we solve this particular case (and probably improve a lot of other code) by treating index nodes with string constant ids like regular property accesses.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                hannesw Hannes Wallnoefer
                Reporter:
                hannesw Hannes Wallnoefer
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: