Popularity of Nashorn

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.

Comments:

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

Posted by guest on June 20, 2014 at 10:58 AM PDT #

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

Posted by jlaskey on June 20, 2014 at 11:05 AM PDT #

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

Posted by guest on September 24, 2014 at 05:31 AM PDT #

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

Posted by jlaskey on December 16, 2014 at 05:24 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Technical discussions and status of the Nashorn JavaScript Project.

Search

Categories
Archives
« September 2015
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today