Performance issue with several posts
-
We have a blog with 6000+ articles, that is 9000+ combinations of posts / category.
When we added your plugin, we notice a huge cpu overload in our mysql server.
After a few research, we found that the query that is executed to get all posts is the cause of all our problems.
We tried to add wp super cache, but it did not really help.
Then, finally, we edited the code to set the “query result” in cache, and it solved the issue.
Look at our cpu activity, from our mysql database. We have several other wordpress sites running on that mysql. But, only your plugin for 1 single site make the cpu move from an average of 5% to 20%.
The following image show the issue:
First part: all our sites without the collapsing plugin.
2nd part, with plugin (3 days).
3rd part: with “wp super cache” plugin
4th part: with the caching.
What we changed in collapscatlist.php:
$posts = get_transient( $cachekey ); if ($posts === false){ $postquery= "select slug, object_id FROM ..." set_transient( $cachekey, $posts, 3600*1 ); }
Also, because we know we have more than 5000 rows, we edited the query to return only slug and object_id, no other fields are required.
- The topic ‘Performance issue with several posts’ is closed to new replies.