Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Beware of Microsoft's jQuery-tmpl templates, if you care about being able to render your views with reasonable performance. You can benchmark 'em yourself here:

http://jsperf.com/dom-vs-innerhtml-based-templating/73

TL, Didn't Benchmark: Two orders of magnitude slower (approx) than other engines. On the iPad, for example, jQuery-tmpl was able to render a small template 181 times in a second, whereas Eco, at the other end of the scale, was able to render the same template 11,549 times.



I don't see why its relevant how fast it can render templates: Wouldn't anything more than once or twice a second be sufficient for general needs?

Edit: I also want to point out that the linked page above is user editable, and allows remotely hosted javascript (by design). Beware :/


In JS web apps, the most common speed constraint you'll encounter is how fast you can render views and update the DOM. Imagine trying to render 500 list items ... say, contacts in an address book -- you don't really want that to take 3 seconds on an iPad. If it works for your needs, that's fantastic, but it's nice to be aware of the performance relative to alternatives that accomplish the same goal.


Thanks for the info. For our internal tests our app renders a template a few times a minute with ~500 nodes, but all our users are on Firefox 4 or Chrome latest so no-one’s noticed a problem. If we stard building client-facing apps I’ll definitely look at the alternatives.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: