X

Popularity of Nashorn

Jim Laskey
Senior Development Manager

I know it's unseemly to toot one's own horn, but after the release I did a Topsy to see how we were faring.


I did some deeper analysis of the tweets and determined that about a quarter of the Nashorn tweets were about zoos and tanks.  The exceptions were when Nashorn crossed above JDK8/Java8.  The first peak was when people started tweeting about the Nashorn release video.  The second was when Benjamin Winterberg announced his tutorial (40.7K hits to date.)

I've also been monitoring the activity on the article Nashorn: JavaScript made great in Java 8 .  It's been hit over 20,000 times.

JavaScript is the language rising star GitHub language trends and the fragmenting landscape. Make Nashorn part of it. Get the word out.

Join the discussion

Comments ( 4 )
  • guest Friday, June 20, 2014

    One thing I am curious about :

    I cannot find anywhere in the official documentation guidelines for how to totally block execution of Java APIs from the scripting engine.

    This is extremely important to be able to properly sandbox scripts, and as you can imagine this is vital on a server if you need to run untrusted javascript.

    Do you have anything that we can refer to in order to achieve this securely ?

    Thanks,

    Hassan


  • jlaskey Friday, June 20, 2014

    This can be done using standard java security filters. For convenience we plan to add Rhino-style Class Shutters.


  • guest Wednesday, September 24, 2014

    Hi,

    I've compared execution speed of

    Rhino(JDK7u45)

    Nashorn(JDK8u40b6)

    Jython(v2.5.3)

    The outcome of using

    - 1 scriptingengine instance

    - 200 CompiledScript objects, each their own SimpleContext, each executing only once

    - all executing in seperate Swingworker instances(i.e. max 10 threads)

    is listed below, as 'total execution duration' :

    * Jython #1 at 152 msec

    * Rhino #2 at 219 msec

    * Nashorn at 13600 msec

    When repeatedly running the compiledScript objects(all, every 500 msec), i found that only after about 1 minute, the Nashorn engine has compiled&classloaded all scripts, after which it runs at comparable speeds.

    I've posted on nashorn.dev.java.net, but there seems to be close to no-one able to comment on this slowness issue.

    Currently, since the seperately provided Rhino(as per "OpenJDK - Using Rhino JSR-223 engine with JDK8") is running about 160x slower than the JDK7u45-built-in one, i'm almost forced to use the Jython engine.

    I'm hoping you can help me in gettng more out of Nashorn

    Kind regards,

    Roland


  • jlaskey Tuesday, December 16, 2014

    Nashorn continues to improve performance. 8u40 will include compiled code caching and better optimization. Next up will be improvements for small scripts (evals.)


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

Integrated Cloud Applications & Platform Services