[graalvm-users] Serialising the Context object

Edoardo Palmieri edoardo at nuvolar.eu
Mon Oct 29 01:59:05 PDT 2018


Hi All,

I am reaching out for help because I hit a bit of a road block using
Graal's Polyglot API in regards to performance. I am developing a service
that will execute user defined scripts (written in JS) using the Polyglot
API and execution times are proving to be much slower than I had hoped for.
I posted on the GraalJS Github page all the details, and while I got some
great feedback there, I still have not found/received a solution to the
problem yet.
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_graalvm_graaljs_issues_57&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=Ec3OB3aijYH6YyUWCz-T5lrkyAz4P3YEYHiu6H41tOA&s=K_051DOogNt2_sCwUHpKBRLK0knLZLa2b4T74mOmbNE&e=

I have learned through experimentation and got confirmation of this from
the GraalJS guys that the Context object learns code as it evaluates it and
gets better (performance wise) at executing it over time. What I am trying
to understand at this point is if there is a way to serialise a Context
object, so that it retains the knowledge about the code that it has
executed up until the time of serialisation, and hence its performance.
This would then allow me, by deserialising the context object,  to execute
code with the most performant context without having to keep the instance
alive in memory the whole time.

Do you know if this is achievable in any way?
Thanks in advance for your help.

Cheers
Edoardo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/graalvm-users/attachments/20181029/b6ac057a/attachment.html 


More information about the GraalVM-Users mailing list