Choosing the fastest template plugin for a data table

I recently changed our asp.net gridviews (which worked with update panels) to HTML tables using jquery-Ajax and templating using jtemplates. The performance improvement was huge !!! (on the server side I use the generic httphandler). One performance issue that I am encountering occurs in Firefox due to the jtemplate plugin. Somehow it takes FF to create a 20-line template in up to 3 seconds !!! (about 100 ms is required on IE or chrome). What is the preferred plugin for templates when my goal is mostly simplicity and performance? I am trying jsrender that works fast but is not well documented (I had some problems working inside the for loop). Knockoutjs seems great, but rather complicated, and I'm afraid of performance issues. Thank!!!

+3
source share
1 answer

For a clean template, JsRender is awesome. JsRender is very fast. See the main page here: http://jsperf.com/dom-vs-innerhtml-based-templating/395

It compares various rendering data of template engines, and JsRender does very well with all browsers. JsRender has no DOM dependencies, is not dependent on jQuery (although you can certainly use it with it ... I do) and is a purely string rendering.

if you are following this route, here is an article I wrote about getting started : http://jpapa.me/clientIn1204

If you want a larger framework for data binding having patterns, then Knockout will be great. But for a clean punch, JsRender is a great choice.

+6
source

All Articles