We have a fairly high traffic site 1.5 million page views a month. The site uses a fairly standard Panels node override for displaying individual nodes. Left side gets node content such as title, content body and node comments. Right sidebar gets a latest stories block, an ad, and related stories block. Actually panels panes in most cases not blocks. We do run memcache and Varnish but we find that the traffic pattern always includes a number of uncached requests and scaling the site up mean delivering a single page as fast as possible.
Devel outputs this.
Executed 208 queries in 112.01 ms. Queries exceeding 5 ms are highlighted. Page execution time was 2039.75 ms. This is too slow
Slowest query is 5.24 ms so queries are not the biggest problem here.
Attached is a screen grab from XHprof and a callgraph.
It seems to me this is death by a thousand cuts. The slowest function takes 165 ms but there are 80, 000 functions called and the total of that just takes too long.
I'm not sure how to speed this up. Do I need to ditch panels, views and all the other nice Drupal tools and just code this up from scratch making sure each part is performant?
Any advice is much appreciated.
|XFProf by Wall time exc||174.38 KB|