Magento – Fixing Slow Category Pages

category

I am working on a site where the home page loads pretty quickly however the categories pages are too slow.

http://tools.pingdom.com/fpt/#!/cMPX60/http://estiloclothing.co.uk/mens.html

This report shows that the "Wait" time is the highest, we have tried many options available with us to debug this, but failed. Can anyone give me pointers as to where this could be wrong. I can add much more details, however at this stage even I am not sure what may be needed to get it in the right direction. Kindly let me know and I shall provide more details.

Best Answer

You need to profile and find where the actual bottlenecks are. If your TTFB (time to first byte) is 32 seconds (wowzers) it means that Magento is taking a long time to render the page to be delivered to the browser.

I wholly agree with @MageWH that the issue is likely that you're loading product swatches. However, I see that these are all media cache images and that leads me to believe that you're probably calling Mage::getModel('catalog/product') in a loop. This is likely the source of your problem.

Vinai Kopp has a writeup about why you wouldn't want to do this and potential ways to avoid it:

http://vinaikopp.com/2014/06/09/preloading-for-scalabiliy/

Magento's Expert Consulting Group (ECG) also has a writeup about best practices to apply (and antipatterns to avoid) when building your store:

http://magento.com/blog/best-practices/top-5-magento-coding-recommendations-optimize-site-performance

Liberally employing some block caches and a full page cache will only mask your real problem here. I think you should use some tools from ECG to find other potential problems:

https://github.com/magento-ecg/coding-standard

https://github.com/magento-ecg/magniffer

Best of luck!

Related Topic