Currently, I am using Rhino engine to execute some big blocks of javascript code on the server side. However, sometimes, it takes so long(more than 10 minutes) and eat up all CPU usage (at least on my local development env, it is doing this right now).
So I am wondering that what I can do to improve the current system or I can try a new one there.
Any thoughts would be appreciated.
Thanks!
PLUS: It throws the exception while the code is too big: java.lang.Exception: No Context associated with current Thread