note 52652 deleted from function.ob-start by cmb

From: Date: Sun, 14 Jul 2019 11:25:29 +0000
Subject: note 52652 deleted from function.ob-start by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211573@lists.php.net to get a copy of this message
Note Submitter: JM ---- I don't claim to understand this--I would have expected the exact opposite--but it seems that ob_start() ... ob_end_flush() can massively improve perfomance, by at least a factor of 10 (admittedly a small number of samples). I tried this after discovering that I could move a large (100ms) bottleneck in one of my scripts into echo "<!-- about 40 characters of junk -->"; which clearly shouldn't have taken long to run. My unfounded theory is that without buffering, the interaction between PHP4.3.4 and Apache is not optimized, whereas with buffering, PHP delivers the entire page at once, which Apache handles better. I should add that this is under https.

« previous php.notes (#211573) next »