Soliciting feedback on user query optimization
I’ve just put up a first-draft patch for the new BP_User_Query object, which overhauls (and highly optimizes) the way that BuddyPress performs user queries: #4060. Please read the patch and my comments if you fall into one of the following categories:
- You’ve developed for a BP installation with a very large userbase and can provide data points
- You’re a MySQL wonk and can analyze the optimizations provided by BP_User_Query
- You have developed plugins or other customizations that have used the ‘bp_core_get_paged_users_sql’ or ‘bp_core_get_total_users_sql’ filters, and are concerned about the backward compatibility plan for BP_Core_User::get_users() and these two filters.
Thanks!
croixhaug 5:18 pm on August 25, 2012 Permalink |
This looks like an amazing improvement for large installations. I have a couple customizations using ‘bp_core_get_paged_users_sql’ and ‘bp_core_get_total_users_sql’ so I’ll take a look for any issues with backwards compatibility in those scenarios
John James Jacoby 9:20 pm on August 28, 2012 Permalink |
Cleaned up the patch a bit, but I really like this approach. Will be nice to get this to a place where we can use it for friends, activity, private messages, and other components too.
Erlend 7:17 am on August 29, 2012 Permalink |
Speaking of BuddyPress performance & optimization, has there been any developments relating to this old (massive) discussion?
http://bpdevel.wordpress.com/2012/03/05/custom-post-types-yesno/
Paul Gibbs 9:01 am on August 29, 2012 Permalink |
Not really.
Paul Gibbs 8:09 am on August 30, 2012 Permalink |
The version of my Achievements plugin on wordpress.org filters both those SQL functions. I add another table to the SELECT, add a couple of new WHERE conditions (compare IDs from values the added table), and change the ORDER BY. I doubt the new function will let me query against a custom table?