Share context/JS bindings
Hannes Wallnöfer
hannes.wallnoefer at oracle.com
Wed Jun 15 13:02:29 UTC 2016
I prototyped the proposed change to the clear() method. It seems to work well and makes a lot of sense to me, so I filed a bug for it:
https://bugs.openjdk.java.net/browse/JDK-8159589
I haven’t discussed this with the other team members yet, so let’s see what they think.
Hannes
> Am 15.06.2016 um 11:24 schrieb Axel Dörfler <axeld at pinc-software.de>:
>
> Am 14.06.2016 um 22:09 schrieb Tony Zakula:
>> Interesting. We use on global context and create a new engine context
>> with each run. The initial compile of several scripts is over 100ms,
>> but then we see that drop to under 10ms. The context creation seems to
>> have very little overhead. We have not timed that specifically though,
>> just total process time.
>
> In my special use case which was a very short JavaScript that was used as Comparator, actual execution time was very short, so the impact of the optimizations were pretty obvious.
> Sorting about 15000 entries took way over 10 minutes before any optimization. IIRC after using a single global engine this dropped to about 2 minutes. After also reusing the JS context, it went down to 10 seconds.
>
> Bye,
> Axel.
>
More information about the nashorn-dev
mailing list