I’ve finally posted the update to the WPI Performance Plugin. This update includes quite a few changes. If you’re not already aware, Eric & Stefan from Datafeedr kindly posted an email to their customers about this awesome plugin to help your WordPress websites scale. As a result of that, I got a whole lot of new customers using this plugin as well as a whole lot of bug-reports and feature requests.
This update takes care of all of those bug reports and the vast majority of feature requests you all asked for. Here’s what has changed:
- Remove product counts from category/attribute widgets – mostly for aesthetics, but *can* give a minor speed boost
- Option to switch on/off the SQL cache for the category/attribute widget product counts
- Option to change the cache duration
- Option to clear the cache
- Option to keep or disable the slow WooCommerce filters and actions. Choosing to keep these should resolve any theme compatibility issues if you’ve experienced those
- Option to remove sort options and use the natural sort order – in combo with the following option, this can remove the table scan/index scan from WP_Query
- Option to remove product counts for WP_Query – this breaks pagination (pagination will forever pretend there are 100 pages instead), but avoids table/index scans. Because pagination is technically broken by this, you should use it in conjunction with an infinite scroll plugin
- Option to load WooCommerce product pages using an iframe/Ajax – this is to help infinite scroll behave better from a user point of view. If a user scrolls down to page 3 or 4 or more using infinite scroll, then clicks a product, then clicks the back button to return to the archive/product list – normally the user will end up back at the top of the archive page and will have to scroll down again to get back to their previous position. This is annoying. Enabling this option makes the product page be fetched using Ajax and an iframe, uses the history API to update the URL correctly, but importantly means that when a user clicks the back button they end up back at the exact position they were at in your product archive. There’s a video below about this.
- Index status is shown
- All warnings and notices have been fixed – thank you for the reports
- If you modify product categories, the cache is now cleared (if in use) which fixes errors especially if you had removed a category
- The option to keep WooCommerce actions & filters added to fix theme compatibility issues
- A new index to speed up the call WordPress makes on every page to get the options from wp_options marked as ‘autoload’ has been added. If you have a large number of options, this massively speeds up this query when it happens. e.g. with 370,000 options, 2.7 second queries now take 0.008 seconds on my reference server.
- Another index to speed up imports (as well as some other queries) has been added
- The options to remove sort order and WP_query product counts have been added which give the final boost required to make my 817,000 product demo site sub-second
Features deferred for next upgrade
I didn’t manage to fit everything in – here’s what’s coming soon:
- Calculate min/max price for price filter widget automatically – I’ve got a fast way to do this in development
- CSS styling box – I will add a CSS styling box for the widgets
- Display options – I will add some CSS options to style the widgets, price filter, category filter, current filters, recently viewed products and attribute filters
More detail about the Sort Order and WP_Query performance options
I wrote a separate article about these options here: https://www.wpintense.com/2016/08/15/natural-sort-order-paginationproduct-count-options-work-wpi-plugin/
More detail about the Ajax option
If you have any queries or comments, reply below or use the Q&A section.
He is always on at least one of his computers when he's awake, so get in touch and he'll get right back to you.
Latest posts by Dave Hilditch (see all)
- Cyber Monday Sale - November 28, 2016
- One Week Sale!! - October 11, 2016
- Quick update on progress and what’s coming (Price Comparison Pro update out soon) - September 26, 2016