The best place to post a query like this is nashorn-dev. In fact, we were actually looking at this today and we think we have ways to fix this. Partial remedy might be to use —global-per-engine=true, setting, which will limit the creation to one global shared between engines. Right, Sundar?
/M On 21 Jul 2014, at 17:49, Julien Ponge <[email protected]> wrote: > Hi Frank, > > I'm not part of Oracle or the team working on Nashorn, so this question is > best for Marcus who is part of it at Oracle. > > Cheers > > - Julien > > Begin forwarded message: > >> From: Timo Frank <[email protected]> >> Subject: Oracle Nashorn Question >> Date: 21 Jul 2014 14:05:59 GMT+2 >> To: "[email protected]" <[email protected]> >> >> Dear Sir, >> >> lately I found your article on >> http://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html >> about Java’s new JavaScript Engine Nashorn. >> At the moment I’m doing some research about integrating different scripting >> languages in the JVM via javax.script. >> After profiling some script executions with Mozilla Rhino and Nashorn I >> noticed, that nashorn’s initialization lasts much more longer than rhino’s. >> For curiosity I checked the CPU cycles: >> <image001.png> >> >> It appears that the creation of a global object takes a long time in >> nashorn. In Rhino for example, this step doesn’t seem to exist. >> Since I found no detailed information about this object I hope that I may >> ask you about this initialization step, which appears to be a huge >> disadvantage for Nashorn against Rhino. >> >> Best Regards, >> Timo Frank >
