Share context/JS bindings
Axel Dörfler
axeld at pinc-software.de
Tue Jun 14 08:41:01 UTC 2016
Hi Hannes,
Am 14/06/2016 um 09:53 schrieb Hannes Wallnöfer:
> The problem seems to be that bindings.clear() uses the ECMAScript
> delete operation to clear the bindings, and that will only delete a
> property if it is configurable. However, var declarations are
> non-configurable and therefore „survive“.
>
> I’m not sure how to work around this, and possibly we should fix our
> implementation of clear to include non-configurable (declared)
> variables.
That would be great!
Is there any other way of reusing the JS context that does not exhibit
the issue? Recreating for every call is very expensive (having a single
engine, using compiled scripts, and sharing the context brought a 100x
speedup in execution time -- and the context was responsible for half of
it IIRC).
Bye,
Axel.
More information about the nashorn-dev
mailing list