Page load time is a vital part of any website’s user experience because while load time isn’t a large contributor to SEO rankings, it can have a significant effect on your conversion rate. For every second saved on load time, you’ll boost customer confidence and trust in your site. The reverse unfortunately also applies. Interesting surveys done by Akamai and Gomez.com provide a few statistics which illustrate these points:
One regular method used to decrease load time is to cache as much data as possible that is not session-dependent. Last week Chris and I spent some time on speeding up one of our sites, which I’ll identify as domain.com. Parts of the site that change fairly infrequently such as the footer and home page panels are now being cached, which is shaving off vital time in the strive towards zero page generation time. However, we noticed that the page generation time was still suspiciously high, even when practically everything being displayed was coming from cache. Appending XDEBUG_PROFILE to the request and opening the resultant profile in WinCacheGrind showed the following: _initRouter was taking 60% of page generation time? After drilling down through the profile and looking at the function it revealed that it is suffering from two issues:
While there was some caching for routes, the ‘blog post preview’ routes were not being cached.