Scalability Pro Plugin – Setting Up Your Site to Scale

Dave covers all the options available in the Scalability Pro plugin and shows the performance impact of various options using our reference WordPress site with 1 million products.

 

Video Transcript

Hi there in this video I’m going to show you Scalability Pro, show you it in practice, show you how fast that makes your site, show you specifically what it does because we have a few plugins and they all optimise your performance in slightly different ways.

Now so this is the product page for it okay and what I’ll do first of all I’ll show you the speed that we’re talking about this is our FoundThru demo site it has about a million products on it and you can see up here this is uncached page speed this is query monitor that’s installed and you can see it’s .04 seconds per database time, 450 milliseconds total time. Refresh the page just to show you that in practice. Now the parts on the right-hand side that’s Faster Woo Widgets (Super Speedy Filters) but what Scalability Pro is actually optimizing is the WP_Query on this archive page that’s mostly what it’s optimizing.

Okay now in order to be able to show you the actual things that each part of the settings optimize I will disable (Auto) Infinite Scroll temporarily because then we can scroll to the bottom of the page and actually read what query monitor tells us. Ok so deactivate (Auto) Infinite Scroll okay and then, okay so when you install Scalability Pro first thing you visit the settings page and you install these indexes, there’s a big button to create the indexes. These indexes they help various different scenarios so it could be if you’ve got imports that are referencing WP post meta depends if they’re referencing values in there rather than joining on a post ID. There’s a variety of different scenarios where these can optimize your website depending on what plugins that you have installed and what you’re doing with your site.

Now if you deactivate the plug-in you should delete the indexes first they won’t be deleted when you deactivate the plug-in so those indexes will stay on, so that delete button there is there to let you do that. Okay so all the options that you get they’re all grouped into the areas that they help optimize so optimizing WP query this is for your archive pages so an archive is like this slash shop page but it’s also like your blog archive, it’s any page that has a list of other articles or posts or pages or whatever.

Okay so I’ve taken (Auto) Infinite Scroll off, now if I go and look at the queries by caller then you see here we’ve got WP_Query get_posts okay, now this is what these top options are all optimizing okay so I’ll switch them off so you can get a feel for what speed difference this is making. yeah switch all four of them off, they all optimize in different ways you might find that you only have to enable two of them or maybe three of them in order to get this speed. I’m going to show you that as well, it depends on how you’re using your site but that’s them off okay and this is what you get with default WordPress WooCommerce and this is without using the WooCommerce widgets. I’ll show you that in a separate video with Faster Woo Widgets (Super Speedy Filters) but if you have Faster Woo Widgets (Super Speedy Filters) on, sorry if you have the traditional WooCommerce widgets like the price filter or the category filter this page will take over a minute to load.

But as you can see anyway with those options off this page is now taking six seconds to load and if I go to queries by caller again WP_Query get_posts we now have six seconds for this query okay, and specifically this SQL_CALC_FOUND_ROWS that is calculating the number of items, so it’s for pagination so you see that option here okay, and then this order by menu order title that is the sort order, and there’s no LEFT JOIN on this page, there’ll be a left join on a different page if I go into it, I’ll show you a different page so that I can show you this one working and yeah there’s I can’t show you this just now because that would be if there was a GROUP BY command okay, but the top two anyway the primary one you want to try is removing the pagination first of all, okay it’s probably gonna be the one that’s going to boost your speed, I’ll show you that, I’ll take pagination off okay. Reload that page. Now in our case it speeded up a little bit but we’re still getting a table scan because of this order.

Now, that means that if we go in and remove the order, remove the sort options, okay there we go right so we’re down to .45 seconds now. Okay, and then these other ones the LEFT JOIN this is for if you go into like a category or something like this, let’s go into baking, okay I’ll just refresh that page because we’re loading this with Ajax. Yeah it’s actually not that bad. It says the times when it’s slow is if you’re joining to postmeta, right ok aye (yes) so if I do another query here and I go back I go to, in fact I’ll go to dogs > dog toys yeah, I’ve got dog toys and I’ve got blue dog toys. Alright let me check. Yeah it’s still joining. If you’ve got queries that if you look at WP_Query get_posts if you see queries that are joining to wp_postmeta then that’s when this will really help and it will really speed things up.

Okay and this one it’s if you see well this GROUP BY command is actually needed here but in some cases WooCommerce will run this GROUP BY command even though it’s not required so that’s safe to add you can add that and there are some cases where it’ll speed things up. Now going through the rest of the things quickly the variations this is for product detail pages, you’ll find that these options up above depending on what you have on your product detail pages I’ve got a product detail page I’ll show you, let’s go to one of these pages.

Okay so you see the page is fast, .2 seconds, but depending on what you have on your product detail pages, you might actually be using archives on your product pages so if you’re using widgets or short codes that list other products, maybe you have something in the footer or something like that, it depends what you’re doing but if you’re doing archive based stuff on your product detail pages then these archives options at the top will also optimize your product detail pages. But then if you have a lot of variations, product variations this option here will really speed up your product detail pages. Basically what happens is by removing that count it makes some work happen through Ajax instead of up front, so it’s probably badly worded and I’ll get an actual example, and I’ll upload another video about that when I find the example that I wrote that for in the first place.

Now faster imports, when you’re importing items this Defer Term Counting, one of the things that WordPress does is it will recount all of your products or posts or articles per category to come up with these counts here, the counts are actually stored in the database for each category and taxonomy and everything. Now if you’re importing 10,000 items without this on, depends if the import tool that you’re using has also set up Defer Term Counting, but if it hasn’t then you could be recalculating those counts 10,000 times when it makes much more sense to do the 10,000 items, get them imported and then recount once obviously right, it saves a lot of CPU and a lot of disk, so if you stick that on it’s going to speed things up.

Now WooCommerce optimizations there’s if you have this is, this is specifically if you have a lot of entries in WP options, so if you have a lot of transients you might be using a caching plug-in or something which stores data in WP options. WooCommerce have written some bad code where they do a LIKE command in order to delete these three kinds of entries that they put into WP options. Now basically this happens after an update for WooCommerce so and what happens is basically every I think it’s roughly every ten minutes or something on this website on FoundThru where we’re getting three minutes lockout 180 plus seconds lockout on WP admin, okay so that option highly recommend it, it eliminates those intermittent lock outs and basically instead of, instead of the delete commands taking three minutes rewrites the one delete command into three separate commands and they’re done in less than a second.

Now this custom meta select box this is for your backend WP admin with WooCommerce and I can show you if I edit a product. I’ll just make sure the screen option is on, custom fields, need to make sure custom fields is on to see what this is doing, but down here custom fields normally this select box would be populated and that gets populated when this is not on and it takes, well I can run it to show you. Ok so you see that page was .46 seconds. It’s not a huge difference but you’ll see if I go in here. Yeah so this is the command here so it’s added the .2 seconds. I mean I like performance right so anything that I can add to performance I will do. .2 seconds does make a difference I mean that means that your server is, you know, this is using CPU and disk. You don’t want your server to be using CPU and disk when it doesn’t have to. So it doesn’t mean that you can’t use metadata it just means that that little select box isn’t populated. I’ll show you that select box cause it’s still populated I haven’t refreshed the page yet right so it’s this which lets you go and set custom meta yeah, but now if i refresh it you see we’re back down to 0.4 seconds, 0.39. Now the select box is gone but you can still just type in the name of the metadata if you want to add any metadata okay.

Now next option. Okay so the Woo dashboard this one’s for you guys that’ve got lots of orders, if you’re an affiliate then this won’t apply to you this one but if you have a lot of orders in your database then WooCommerce has this dashboard widget that they add by default on to WP admin and now that dashboard is slow slow slow so removing this basically speeds up WP admin, and if you’re running that calculation it’s basically calculating how much money you’ve made in the past month. It shows you a little graph but if you’re running that calculation that means that you’re thrashing your disks and thrashing your CPU so that means you’re affecting your users, so if you’ve got a lot of orders remove that, you can still jump into WooCommerce and go to the ports so you know it’s you can generate reports and look at your profits whatever whenever you need to, or your revenue.

Now this part here this is for, it’s not actually just for WooCommerce that’s badly named as well, I need to fix that but this is, it’s for all archive lists in the backend okay so when I list all products here you see it’s still not great brilliantly fast I’ve got one more optimization to add here, I think it’s about six seconds yeah. But what this is doing is the parts that are slow here right, it’s generating this which is your post status, it’s generating these counts and it’s bad code because it actually runs to two table scans here because it counts for all and then it counts by tape when it actually could calculate all based on the second query that it runs. The other ones that it does remove are these filter by category so that drop-down list will be removed and filter by product type that’s been removed okay If you need them, if you need them then obviously don’t choose that and those will come back. I’ll show you the speed that you get okay that’s not a, well it’s a bit of a difference, I’ll rerun it, 6.2 was what we were on and then with those counts see where’re we at, 6.52 – yeah I mean it’s because of that last one because the database is caching, it’s fetched all the data from that whole table scan into memory so it’s only less than half a second optimization, but once I get this fixed which is coming it should be next week maybe, then this page will load in under a second probably about half a second cause that’s the last table scan on that page okay so that’s what that option is and that is what that will do shortly it will also fix that post status okay.

This separate part this is yeah yeah so there are cases where there’s joins to wp_postmeta and it’s joining on the value equaling something so there’s a field in the wp_postmeta table called meta value and what they do is they say like say it’s a number right so they’re checking that the meta value equals six and they’re casting meta value to an integer and then checking to see if it equals six. Now if you do that it means that you can’t use an index on the meta value field okay so it depends, I’m gonna list up numbers of the situations where these occur so you can find, so it makes it easier for you know whether you should switch this on or not, but it’s safe anyway so if you want to switch it on it’s a good idea. Okay but that’s all the options and basically what you get, what you end up with is, I should make sure everything is still on, what you end up with is a really fast site. I’ll go back to the front end and show you.

So this is our demo shop and I’ll switch, in fact I’ll switch back on Auto Infinite Scroll and I’ll reload, okay so you see as we scroll down it just keeps loading yeah, and this is the kind of speed that your users want and expect, yeah if you don’t have this kind of speed there they’re leaving, so that’s what scalability pro does now bear in mind okay that if you’re using the traditional WooCommerce, sorry I didn’t mean to highlight that, If you’re using the traditional WooCommerce filters then Scalability Pro on its own isn’t going to help you, you need to get the Faster Woo Widgets (Super Speedy Filters) plug-in as well. So you can get that as part of the plug-in pack.

I’ve made four plugins available in the plug-in pack and discounted price as well. But basically the price filter is the worst one I’ll show you that in a separate video but the price filter adds like 60 plus seconds to this page whereas the category filters, they add like 5 or 6 seconds. The attribute filters from WooCommerce they don’t add anything but they’re not compatible with Faster Woo Widgets (Super Speedy Filters) you have to use one set of widgets or the other unfortunately, it’s just the way it is. Anyway I’ll show you the Faster Woo Widgets (Super Speedy Filters) in a separate video and if you’ve got any questions about Scalability Pro yeah so from the product page we have the frequently asked questions section here so just fire in and ask a question and I will keep updating the FAQ with answers as people ask. And obviously this one here this question was somebody that hadn’t switched on Scalability Pro, but hopefully this video anyway will show you how to actually use it and what all the settings are doing and there’s more to come.

If you want to get hold of this plug-in you can find it over at WP intense that’s the website, superspeedyplugins.com and yeah the performance plug-in pack is what you really want. It includes Scalability Pro, Faster Woo Widgets (Super Speedy Filters), Auto Infinite Scroll, and Super Speedy Search. But yeah I look forward to answering any of your questions and see you on the site.

We will be happy to hear your thoughts

Leave a reply

WP Intense
Logo