Am 14/06/2016 um 17:52 schrieb Tony Zakula:
Have you tried reusing the engine and only creating a new Context for
every run?

Sure, but creating a new ScriptContext has a substantial overhead.
AFAICT sharing the engine only enables caching the compiled scripts, as well as making Compilables work. IIRC both (reuse context, reuse engine) had a similar impact on performance.

Also, have you turned on caching for scripts as the engine
parameter? We have seen good performance doing that.  Would be
interested to know if you do.

I'm not sure what you mean. AFAIK Nashorn caches scripts automatically as soon as you start reusing your engine, you don't even have to use Compilables.

Bye,
   Axel.

Reply via email to