1

I'm investigating why our homepage wait time is so slow (4.8s). Using NewRelic I've found out that the Mage_Core_Block_Template::fetchView call is using an excessive 2800ms. I don't understand why it takes so long for it to fetch views while the Block Cache is active and that the Redis Server behind is working.

I'm using PHP 5.5 with PHP-FPM, Nginx, Redis and Percona MySQL 5.6.

Has anyone some clue on how to debug this weird behavior? This is the only page to do this, all the others requires under than 1.5s to render.

1 Answer 1

3

public function fetchView($fileName) fetches each .phtml file for your home page and includes it.

Can you use NewRelic? Or if not, turn on the Varien Profiler or use your own timers and logging to measure the time taken for each $filename's fetchview. ($filename will be the block template file eg left.phtml)

That should indicate which block template file is taking so long to render. Then you might want to read the .phtml or add timers and logging into the .phtml file and it's associated .php class file to narrow down the sticking point.

It may be a feed or a social media button that is relying on a connection to another server to respond - so maybe worth reviewing what blocks on your home page rely on external content.

As a plan B you could just start removing blocks from your home page via your theme's local.xml file and watch for a speed improvement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.