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
In order to play with performance relevant options I'd like to be able to customize more properties of the JexlExpressionHandler:
Including:
cache size (max number of cached expressions; default 5000)
cacheThreshold (max length of expressions to be cached; default 64)
debug (whether or not to provide debug info; default true)
While the advantage of being able to play around with 1 and 2 is quite self explaining, 3 maybe not:
As debug is enabled by default and all these options do not seem to be customizable easily without implementing a very custom ExpressionHandler, each rendering (huge) pug templates results in thousands of these executions:
public JexlInfo() {
final StackTraceElement[] stack = new Throwable().getStackTrace();
...
}
which produces a lot of full stack traces of arbitrary length and is likely to hit the rendering speed.
As a simple solution maybe it would be enough to have the method de.neuland.pug4j.expression.JexlExpressionHandler#getJexlEngine refactored to use a PugJexlBuilder received from a protected method which we can override like:
In order to play with performance relevant options I'd like to be able to customize more properties of the JexlExpressionHandler:
Including:
cache
size (max number of cached expressions; default 5000)cacheThreshold
(max length of expressions to be cached; default 64)debug
(whether or not to provide debug info; default true)While the advantage of being able to play around with 1 and 2 is quite self explaining, 3 maybe not:
As
debug
is enabled by default and all these options do not seem to be customizable easily without implementing a very custom ExpressionHandler, each rendering (huge) pug templates results in thousands of these executions:which produces a lot of full stack traces of arbitrary length and is likely to hit the rendering speed.
As a simple solution maybe it would be enough to have the method
de.neuland.pug4j.expression.JexlExpressionHandler#getJexlEngine
refactored to use aPugJexlBuilder
received from aprotected
method which we can override like:The text was updated successfully, but these errors were encountered: