Assuming that we have millions of requests per day. Is the HTML processing in Node.js with Jade slower or faster than PHP\'s render engine? Or doesn\'t matter because th
Jade templates are memory cached, so the second request will be almost immediate.
If you are concerned about templating speed with jade, you can use self
option.
Jade isn't designed for speed, it's designed for elegance. If you're really concerned with speed there are other javascript rendering engines that are faster.
Check out http://jsperf.com/dom-vs-innerhtml-based-templating/63 (note that the chrome results match closely to node.js performance)
But that's all assuming the rendering engine is the bottleneck, and not the DB.
First off, I know this is VERY OLD but I would like to meta tag my benchmark to help other seeking the Jade vs decisions. I added a benchmark comparing both recently since I got stuck picking out a template engine. I choose twig because I already used it and have never used Jade. I do like how simple Jade is and can be beneficial for getting "quick web apps" up however I've written HTML and CSS for over 15 years and seeing the markup makes me smile.
Express - Jade vs Twig Benchmarks:
The views in Jade are compiled to actual Javascript, and then cached for latter use. In terms of rendering Jade is as fast as rendering a page written in raw Javascript. The compile time does add an initial over head, but you should only need to compile the code once(most likely when node initially starts up).
Your welcome to run the tests, but basically php is typically interpreted on each request(obviously memache does kick in), while the jade views should be completed cached in memory.