GD bbPress Toolbox Pro 4.3.4 is a minor release that deals with performance issue of the statistics function that could potentially lead to slow SQL response on pages where that function is used.
Function for getting forum statistics ‘gdbbx_get_statistics()‘ was relying on bbPress own ‘bbp_get_total_users()‘ function. And that one was using WordPress own ‘count_users()‘ function. This last function is marked as very slow SQL query function and it can lead to performance issues. If you have a lot of users in the database, this performance issue can lead even to server crashing. It has surely crashed Dev4Press server a few times already over the past few months, and we have found evidence of it in the MySQL logs. WordPress uses this function on the Users panels, and you can notice issues there too. I can’t do much about WordPress, but I can change GD bbPress Toolbox Pro to stop depending on the function that is obviously a problem. Hopefully, WordPress core team will revisit this function and improve it.
To remedy this issue, and to stop using this WordPress function, I have created a new and simpler function for counting users, and the whole statistics function output is cached for a period of one hour. This will lead to generating statistics once every hour and avoid running 20+ SQL queries to count various forum information every time function is called.
If you notice any problems with the plugin, stop by the support forums to report it. Let me know what you think about the new version, and as always, suggestions are welcome.