My site's admin section has a bunch of very slow report-generating scripts that echo
output line by line as it is generated. To have this output flushed immediately to the browser, instead of the user having to wait for minutes before they see any response, we have output_buffering
disabled and we call ob_implicit_flush
at the beginning of such scripts.
For convenience, I was considering just turning on the implicit_flush
setting in php.ini instead of adding ob_implicit_flush()
calls to every script that would benefit from it.
However, the documentation contains the following scary but unexplained remark:
implicit_flush
...
When using PHP within an web environment, turning this option on has serious performance implications and is generally recommended for debugging purposes only.
What are these "serious performance implications", and do they justify the manual's recommendation?