voip03 Posted September 23, 2011 Share Posted September 23, 2011 PHP Buffer Flushing is it good or bad? thank you all. Link to comment https://forums.phpfreaks.com/topic/247697-php-buffer-flushing-is-that-necesery/ Share on other sites More sharing options...
KevinM1 Posted September 23, 2011 Share Posted September 23, 2011 PHP Buffer Flushing is it good or bad? thank you all. Why are you using the buffer? Link to comment https://forums.phpfreaks.com/topic/247697-php-buffer-flushing-is-that-necesery/#findComment-1271980 Share on other sites More sharing options...
voip03 Posted September 23, 2011 Author Share Posted September 23, 2011 PHP Buffer Flushing is it good or bad? thank you all. Why are you using the buffer? Speed Up the Website Link to comment https://forums.phpfreaks.com/topic/247697-php-buffer-flushing-is-that-necesery/#findComment-1271993 Share on other sites More sharing options...
KevinM1 Posted September 23, 2011 Share Posted September 23, 2011 Like most things, it's neither all good or all bad. Any benefits gained by flushing the buffer are dependent on what kind of architecture you're using. You won't see much benefit in an OOP/MVC environment, for example, as all processing is done before anything is rendered. Flushing, in that case, is pointless as the only logic left to perform at that stage would be simple view logic - conditionals (if/else) and loops. Also, depending on where you flush (most people recommend at the <head> of the document), you'll remove the ability to use HTTP headers, including redirection headers. All in all, it seems like the kind of micro-optimization that may be better addressed through caching and compression. Link to comment https://forums.phpfreaks.com/topic/247697-php-buffer-flushing-is-that-necesery/#findComment-1271999 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.