Our website has been experiencing "slowness events" where the website becomes nearly unusable as it takes a very long time to load. These slowness events are being tracked by a tool called New Relic that provides server-side tracking on web transactions, database operations, etc. These slowness events show a clear pattern of excessive database operations overloading the server, leading to plummeting throughput.
As we investigated the types of transactions happening during the slowness events it became clear that the culprit was excessive MySQL calls. As we investigated where these were coming from we knew these calls were meant to help produce dynamic content. When we compared Toolset calls (from views and content templates) these matched the types of queries (also one of the MySQL calls has Toolset in the name...)
What this boiled down to is that we are making MySQL calls with little to no parameters, forcing it to crawl/search a very large table in order to produce a single answer to part of the query. As many queries have multiple calls in them and pages often have multiple dynamic pieces of content produced by said queries, and all of the content is loaded sequentially (no async in any part of this), this lead to a massive data pull just to get the dynamic portions of a page loaded (this is not including the page itself or any of the other content on it). What this would look like is that some pages have over 50 MySQL queries on them, each having to search over 55,000 rows to find each part of their query string. This could mean searching over 2 million rows. This happens each time any visitor comes to any page. Undoubtedly, there are other problems on the site, but this is a clear and present issue that we have identified.
Since this appears to be associated with the Toolset Views plugin, is there anything you can do to help us resolve this issue so that our site (and our other sites on the server) are not impacted by these slowness events?
Hello. Thank you for contacting the Toolset support.
In general, performance obviously affects the site speed when you have hundreds of custom post type setup with the number of taxonomies as well as custom fields. Another aspect is how much content you have BUT it depends also on your server configuration (CPU,memory,cashing) as well as number of other factors such as how complex your data structure is.
When you use block to get the dynamic content its but obvious that it will fire a new query per block you added to get the dynamic content belongs to block.
Here is the general article abbout how you can improve the performance of WordPress site:
- hidden link
Alternative to this, you may build your views or content template using legacy views instead of blocks that should help you to have better performance.