-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
chanwook park opened SPR-13487 and commented
Spring MVC mechanism is create one instance for View (View = URL).
And ScriptViewTemplate has one Nashorn's ScriptEngine (SpringTemplateView#engine), or more ScriptEngine instances because using ThreadLocal (ScriptTemplateView#engineHolder).
For example, app has 1000 view(URL), then create 1000 ScriptTemplateView instance and at the same time create 1000 Nashorn’s ScriptEngine instance(or more +). And one ScriptEngine is loaded only one template HTML.
In my case, I have been used like that caused memory consumption. (I've been used JDK6+Rhino+Dust)
I hope to more careful managing view instance and Nashorn's ScriptEngine instance.
Maybe not consider share and DI to SpringEngine instance?
Of course, aspect of concurrency and resource management.
Thanks.
- Discuss topic with Sébastien : https://groups.google.com/d/msg/spring-framework-contrib/gsYheHuy9SM/GG2fcZI9DQAJ
Affects: 4.2.2
Issue Links:
- Revise script engine retrieval for better error reporting [SPR-13491] #18069 Revise script engine retrieval for better error reporting