[wp-hackers] output buffering in general and wordpress

Stas Sușcov stas at nerd.ro
Thu May 3 06:22:31 UTC 2012


În data de Thu, 03 May 2012 04:06:11 +0300, Dion Hulse (dd32)  
<wordpress at dd32.id.au> a scris:

>
> tl;dr: Avoid output buffering if at all possible, It's faster for web
> apps to send data over the wire as it's generated, saves memory
> footprint, saves latency, gets the browser rendering things faster,
> etc.
>
>

This is debatable[1][2] and mostly not true[3].

Beside caching and gzip-ing, a reason to use output buffering is in case  
of a template engine[4].

[1]:  
http://stackoverflow.com/questions/1556613/php-output-buffering-sounds-like-a-bad-idea-is-it
[2]:  
http://stackoverflow.com/questions/4731375/is-using-output-buffering-considered-a-bad-practice
[3]: https://developers.google.com/speed/articles/optimizing-php
[4]: https://github.com/fabpot/Twig/blob/master/lib/Twig/Template.php


More information about the wp-hackers mailing list