Thanks Sven Panne for the information.
My requirement is that my application has two threads, worker thread (Thread A) and main thread (Thread B).
While the main thread at the start precompiles the scripts and runs it.
The worker thread , dynamically recieves the updated javascript and compiles it. This compiled updated script is later run by the main thread.
If i use isolate and locker for the above, it works fine but isolate and locker adds to the execution time to run the script.Mine is a low latency system so was trying to achieve the above without using isolate and locker.
So i want my worker thread(Thread A) to precompile javascript (updated javascript recieved by the application at run time).
I want to run this precompiled javascript in my main thread.
Currently what i do store the compiled script, persistent context handle in which the script is compiled in the worker thread(A).
In my main thread i access the compiled script , enter the persistent context stored and run the script. For this i use locker and isolate. Since the time of execution along with isolate and locker is more, i am looking for a work around for this.
Any help would be appreciated. Thanks.