News for hackers. Stuff that matters.
Re:Riot.js – A 1kb client-side MVP framework by tipiirai on Friday November 01, 2013 @08:33AM (#6653234)
> Precompilation renders template rendering speeds.

Not 100% sure what you mean but if you measure the time to render a HTML fragment 100 times the total time is 1 x pre-compilation + 100 x rendering. The pre-compilation has virtually no effect on the total time.

Re:Riot.js – A 1kb client-side MVP framework by leokun on Friday November 01, 2013 @01:04PM (#6654914)
I mean that if you do the HTML parsing to JavaScript portion as part of your deploy, instead of in the browser at render time, then all you're measuring is string concatenation and HTML render times, which should always be the same. Template rendering speeds in that case mean nothing.
Re:Riot.js – A 1kb client-side MVP framework by STRML on Saturday November 02, 2013 @11:24PM (#6662078)
Exactly - with the proliferation of Grunt in most modern webapp builds, it is incredibly simple to pre-compile your templates in your production builds. In fact, it's so fast (and I get useful stacktraces when my tpls have errors) that I started precompiling templates in development, too.

I find the bottleneck is 99% the browser's HTML parser and 1% the actual templating library.

If somebody had any tips on how to bring down the "Parse HTML" time spent in the Chrome inspector (see Timeline), I would be interested to know. Tips other than, of course, "parse less HTML".

Re:Riot.js – A 1kb client-side MVP framework by numinos1 on Friday November 01, 2013 @10:53AM (#6654144)
I think that was his point.