3 ms·
There are smart ways to render client-side UI, and there are not-so-smart ways. http://jsperf.com/dom-vs-innerhtml-based-templating/350 http://jsperf.com/dom-v
by jashkenas 15y ago
There are smart ways to render client-side UI, and there are not-so-smart ways.
http://jsperf.com/dom-vs-innerhtml-based-templating/350 http://jsperf.com/dom-vs-innerhtml-based-templating/350
If you want to use a decent library, you can rest assured that your client-side templates will render far faster than the Ruby version of the same HTML.
- stock_toaster 15y agoEven considering I do not have an 8 core machine with 32 GB of ram sitting on my lap (or in my pocket)? I realize that ruby is significantly slower than v8/JägerMonkey/Tracemonkey/etc, but is it so easy to discount the significant disparity between the average compute power of a server vs mobile/laptop? I think a stronger counter argument would be flexibility, smaller http responses (and thus less latency), and possibly an argument that it is simpler or more straightfoward, in favor of client-side javascript templating/rendering, but rendering speed? Not so sure.