Do php comments take server time?

2019-07-04 19:26发布

I am working on speeding up the response time of the website I'm currently working on. Can anyone tell me if the php parser takes the time to look at the code within comment blocks, or is it completely ignored? I ask because I'm wondering if removing many large blocks of commented code would do anything to improve page rendering time. Thanks.

8条回答
虎瘦雄心在
2楼-- · 2019-07-04 20:13

The parser has to see it; that's how it knows where the comment begins and ends. It's not put into the bytecode though, so it's only seen once per process.

查看更多
Evening l夕情丶
3楼-- · 2019-07-04 20:18

if you use APC(you really SHOULD) the bytecode is stored in memory(big win) so you don't even have to think about it. Although I assume the penalty is subpar.

查看更多
登录 后发表回答