Latest news from the Nashorn team

Jim Laskey
Senior Development Manager

Things have been busy on the Nashorn front, getting ready for the JDK 8 rollout and all.  March 18 is the magic day (EclipseCon.)

 I see that JetBrains has added Nashorn debugging to IntelliJ. This rounds out the debugging story with support in NetBeans and Eclipse.

 The Nashorn team has been working hard on performance improvements for the next round.  The first set involves caching of compiled scripts.  This will make a huge difference for reoccurring scripts (think servers.)  The second set of changes involve optimistic typing, where code generated for functions assumes optimal data types in expressions (ex. integers) and falls back to broader types (ex. double) if it doesn't work out.  This provides a huge performance win, since most of the time the assumptions prove correct.  These fixes are in staging repos moving to the JDK9-dev and JDK8u20-dev repos in the next few weeks.  Both these changes should be in the JDK 8u20 update targeted for August.

Finally, on the Node.js front, Node has found a permanent home in the Java EE world.  The project has been renamed to Avatar.js to tie in with the large Avatar project and is taking full advantage of multithreading.

Join the discussion

Comments ( 5 )
  • guest Thursday, March 27, 2014

    @jlaskey Nodeclipse does need support from Eclipse and Oracle for Nashorn debugging https://github.com/Nodeclipse/nodeclipse-1/issues/135

  • guest Thursday, August 28, 2014

    Did these changes make it into 8u20?

  • jlaskey Thursday, August 28, 2014

    Basic caching code made 8u20, but the bulk of the work changed to support Optimistic Typing which will come out with 8u40.

  • guest Thursday, September 11, 2014

    Is there documentation on how to take advantage of the caching enhancement?

  • jlaskey Monday, September 15, 2014

    Documentation will come with the release. In the mean time

    --persistent-code-cache=true and --class-cache-size=50 are the two main options

    for managing the code cache. The cache is off by default to get better startup

    performance for run once scripts.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.