Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Templates performance

Is this technology intended for small templates or could be used to display large sets of data? Such as tables with 1000 rows and 20 columns?

How does the performance scale for cases such as these? The ideal and clean way to display the data would be to feed JSONified data returned from the Web Service to JQuery Template. It looks sleek in theory but does it fly in practice for large data sets?

like image 641
sarsnake Avatar asked Jan 04 '11 04:01

sarsnake


1 Answers

It depends a lot on the browser that does the rendering. IE6 can be fairly slow (though transferring 1,000 large rows of HTML markup and injecting that into the document is not going to be fast either).

Here's a jsperf benchmark that generates 1,000 rows of 10 columns and renders it. I'm averaging 200-250ms to render the 1,000 rows in Chrome 9.

The more important question should really be: Why in the world are you displaying 1,000 rows at once? There are always better UX alternatives than that.

like image 124
Dave Ward Avatar answered Oct 11 '22 09:10

Dave Ward