thanks, this is very helpful. one issue remains for me - is there a good way to reset the script engines in a development environment without restarting the whole app?
--matt On Wed, Jul 15, 2015 at 1:02 PM, Sebastien Deleuze <[email protected]> wrote: > Hi, > > We ended up to use thread-local script engines [1] in Spring 4.2 for > Javascript libraries not designed for concurrency like React or Handlebars. > Based on my initial tests, it works pretty well. The main remaining open > question is about the memory consumption, since it creates one ScriptEngine > instance by thread. > If we see some blocking issues regarding this topic, we may eventually > experiment with a synchronized ScriptEngine pool, but I hope the > thread-local approach will be fine. > > Regards, > Sébastien Deleuze > > [1] https://jira.spring.io/browse/SPR-13034 > > On Fri, Jun 5, 2015 at 5:08 PM, Matt Kime <[email protected]> wrote: > >> I'm curious if any progress has been made on isolating whatever isn't >> thread safe about handlebars template execution. >> >> I'm also working on using Handlebars.js inside nashorn however i'm doing a >> number of things different. i'm precompiling my templates using >> https://github.com/gruntjs/grunt-contrib-handlebars and then compile the >> js >> functions into cached bytecode. >> >> I haven't checked for threading issues yet but I'm glad i found this >> discussion so i know that i should. >> > >
