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
Right now usage of dietTraits requires either different template codepaths (if (dice) compile!TraitsA else compile!TraitsB) or global variables. This is a bit unfortunate since most mechanisms in the traits could work with a runtime value, e.g. htmlOutputStyle.
Would also be nice for stateful (cache) filters.
Might become a bit tricky with the different contexts (nested templates).
The text was updated successfully, but these errors were encountered:
Actually, having htmlOutputStyle can have a considerable performance impact, because, instead of one large string with indentation and line endings, each bit of the output HTML would have to be output individually. Or, alternatively, every template would have to be rendered once for each possible setting.
Using the system in #70, this might be more feasible. Because the strings to output are generated once (when a file is updated) and cached. Something like changing the HTML output style at runtime could re-generate the strings to output and then each subsequent page load could use the cache.
Right now usage of dietTraits requires either different template codepaths (
if (dice) compile!TraitsA else compile!TraitsB
) or global variables. This is a bit unfortunate since most mechanisms in the traits could work with a runtime value, e.g. htmlOutputStyle.Would also be nice for stateful (cache) filters.
Might become a bit tricky with the different contexts (nested templates).
The text was updated successfully, but these errors were encountered: