简体   繁体   中英

ob_start() slows the script

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_shutdown_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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM