FlavorWest.com: speed things up for us
I have been approached by the owner of FlavorWest.com with the slow website complaints. It was taking very long to load category pages, product pages although the e-commerce store was not loaded by third party plugins or complex functionality.
Something was going on and I started investigating.
First i check gtmetrix score of the website and it was not so good.
Page load time is over 13s and that is unacceptable. Lets check time to the first byte(TTFB).
TTFB is over 8s which signals problems with php code execution or slow mysql queries.
First i checked if mysql query caching was enabled. In latest releases of MySQL it is disabled by default but working with magento for long time i strongly advise keeping query cache enabled.
I saw that query cache size was set to 0. I set it to 256*1024*1024=256Mb. The website page load time dropped to 7s on average.
I enabled magento profiler and inspected every entry that was taking more than 0.1s. I noticed Mage_Core_Model_Design_Package::getFilename was taking more than 0.5s - there is a room for optimization. Going through code i found out that 0.5s was spent on checking theme exceptions. Since FlavorWest.com is using responsive design and it is not using magento theme exceptions lets disable them for now (file app/code/local/Mage/Core/Model/Design/Package.php )
Also the client had some plugins installed that he didn’t use (like facebook meta property extension, mobile extension etc). Those plugins had phtml files generated and loaded into layout - it needed to be removed as well to cut on page load time.
FlavorWest had dedicated server that also required optimization. I enabled gzip compression, enabled browser caching with mod_expires plugin.
Css/js merging was off so i turned it back on.
I also optimized images and resaved them with lower size and no compromise on quality. Thus i was able to cut down page size from around 3Mb to 980Kb. The low page size you have the better since not all you customers are on broadband connection.
I also went over some content images and set dimensions for them (width and height attributes). It makes sense to do that as it cuts down on browser resizing.