Egor
08/25/2019, 11:55 AMilya.chernikov
08/26/2019, 8:13 AMChristian Nedregaard
08/28/2019, 8:46 AMeval
leaks memory.
The following test will give OOM at some point. One workaround is to define a function in the script and call it with invokeFunction
instead of using eval
. That seems to not be leaking memory.
Also we see that loading a single script engine instance requires about 650M of memory which seems very excessive. Subsequent instances does not consume so much memory.
Any feedback on how we can alleviate these things would be greatly appreciated. Especially the memory usage. We do not have to use the JSR-223 API.ilya.chernikov
08/29/2019, 9:32 AMChristian Nedregaard
08/29/2019, 1:08 PMBasicJvmScriptingHost
directly and writing the script to define a function that is retrieved with valueOrThrow and then just calling that function is very efficient.
Low memory usage, no leak, no noticeable performance overhead.
Seems like the JSR-223 implementation needs some love 😉Egor
08/29/2019, 1:13 PMilya.chernikov
08/29/2019, 2:56 PMDALDEI
08/31/2019, 3:26 PMilya.chernikov
09/02/2019, 5:54 AM