Yes, I’m fully up to date with WordPress, WooCommerce, bbPress and the theme.
I’ve tracked down cause of the slow query – on every page load, custom-woocommerce.php is called, which contains (on line 14 at the time of writing) the following:
update_option( 'woocommerce_enable_lightbox', false );
Beneath the hood, this is calling SHOW FULL COLUMNS.
By commenting out or modifying this line of code (which, obviously, I can’t do on a production site, as I’ll need to do it every time the theme is updated), the page loading is much improved.
An improvement to this would be:
// Disable WooCommerce Lightbox if enabled
if (get_option( 'woocommerce_enable_lightbox' ) == true ) {
update_option( 'woocommerce_enable_lightbox', false );
}
There was well over half a second extra query time added on purely with a theme change – yes, WooCommerce and bbPress are fairly “large”, but they are pretty much the only other plugins running – unlike some sites I’ve seen where there are loads of active plugins dragging information from all over the place (ie analytics, social icons etc).
I accept some extra load time with the additional options and functionality, but this one query was quite annoying!
I’ve no caching plugin running, firstly as I’m in a development state, and secondly, I have dynamic content based upon the logged in user, which doesn’t appear to cache well, so I’m looking to optimise as much as I can before I implement caching, which should then of course make things even better!
Garry