开发者

ob_start() slows the script

开发者 https://www.devze.com 2023-03-01 04:05 出处:网络
I am using ob_start(\'ob_gzhandler\') for compressing my script.But the script takes too much time for execution. I added ob_end_flush() method in the callback function of register_shutdo开发者_开发知

I am using ob_start('ob_gzhandler') for compressing my script.But the script takes too much time for execution. I added ob_end_flush() method in the callback function of register_shutdo开发者_开发知识库wn_function() because i can't add ob_end_flush() directly in the code.Is this the problem for the delay? Please give me suggestions to speed up my script.Thank you


Suggestions? Well... Don't use ob_gzhandler, use front-end abilities to zip output - apache, nginx can do this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号