PHP vs Node.js - Is HTML Rendering slower in Node.js with Jade?

前端 未结 4 610
感动是毒
感动是毒 2021-02-06 01:23

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

4条回答
  •  走了就别回头了
    2021-02-06 01:47

    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.

提交回复
热议问题