You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a com.hubspot.jinjava.Jinjava#renderForResult method it seems that every time a template is rendered the String template is parsed using JinjavaInterpreter#render->parse methods each time.
Could you clarify why the rendering routine doesn't use some sort of a TemplateId->Node cache to reuse the parsed AST in the rendering step? Are there any obstacles to implement that?
The text was updated successfully, but these errors were encountered:
This is something that someone can make themselves using and caching JinjavaInterpreter#parse and calling JinjavaInterpreter#render. But it would be interesting to explore making that within com.hubspot.jinjava.Jinjava too
If reusing of Interpreter/Node is recommended for performance gain, than how to safely replace bindings before a next render ?
Sth like interpreter.getContext.putAll(newBindings) ?
Given a
com.hubspot.jinjava.Jinjava#renderForResult
method it seems that every time a template is rendered theString template
is parsed usingJinjavaInterpreter#render->parse
methods each time.Could you clarify why the rendering routine doesn't use some sort of a
TemplateId->Node
cache to reuse the parsed AST in the rendering step? Are there any obstacles to implement that?The text was updated successfully, but these errors were encountered: