This is not going to be easy due to the nature of the MVC implementation.
For starters, you can never be sure that the <head> is completely ready until all possible view scripts have been executed (as they may add CSS/JS etc...). By this time the entire response is ready so you might aswell send the full payload. Also, the YSlow rules suggest putting all JS including external scripts at the bottom you should only be putting <link type="text/css"> in the head and <script> belong just before </body> which reduces the effect this will have to CSS assets only. The best performance optimisation you can do is ensure that external assets are cached, 302'd and gzipped.
Did you see much of a performance improvement by flushing previously? I would suggest benchmarking using flush against the standard MVC method (by simularing the additional processing time using wait()) just to check it's actually worth the fairly big compromise you would need to make.
Kind Regards,
Daniel Skinner
Sandeep Manne wrote:
Hi
While trying to improve the performance of our customer's website we came to know about early flushing the buffers as soon as the headers is processed so that the css and js files will download before the body is processed. I want to know whether there is any method in Zend Framework to do this early flushing the buffer.
Reference:
http://developer.yahoo.com/performance/rules.html
--
Regards
Sandeep Manne
S/W Engineer
Sourcebits
没有评论:
发表评论