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
Other javaScript templating engines support compiling the template text to a function which can then be called many times with different values without having the original template text be compiled again and again.
E.g in underscore templates:
varcompiled=_.template("hello: <%= name %>");compiled({name : 'moe'});"hello: moe"
Is there any "hidden" way you can do that with tim?
The text was updated successfully, but these errors were encountered:
@zorbash, unfortunately, there isn't currently a way to do this with tim. Everything is computed on-the-fly.
It's a good idea to have pre-computed templates, for performance, although I think it's likely that in most applications, the performance difference will be negligible. But no doubt there are situations where it will matter. I don't currently have any plans to implement it, but I'd happily review a pull request from someone.
Other javaScript templating engines support compiling the template text to a function which can then be called many times with different values without having the original template text be compiled again and again.
E.g in
underscore
templates:Is there any "hidden" way you can do that with tim?
The text was updated successfully, but these errors were encountered: