[wp-trac] [WordPress Trac] #38741: Introduce the concept of a large site in order to speed up the Users screen when there are many users

WordPress Trac noreply at wordpress.org
Sat Jun 9 14:43:07 UTC 2018


#38741: Introduce the concept of a large site in order to speed up the Users screen
when there are many users
-------------------------------------+-------------------------------------
 Reporter:  johnbillion              |       Owner:  johnbillion
     Type:  enhancement              |      Status:  accepted
 Priority:  normal                   |   Milestone:  5.0
Component:  Users                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  early has-patch dev-     |     Focuses:  administration,
  feedback needs-testing             |  multisite, performance
-------------------------------------+-------------------------------------

Comment (by tharsheblows):

 :) Y'all are harsh.

 Having "network" in the function names for single sites feels strange to
 me, it's contextless and a bit confusing. I would think it's probably
 worth doing what you suggested @spacedmonkey to have clearer names in all
 those functions.

 I'm not sure that single site needs a scheduled twice daily user count
 update on single sites either, it's fine to run it on every registration
 and deletion, it's a quick query. For multisite, the `spam` and `deleted`
 columns aren't indexed so it probably makes sense there, I think that's
 how it currently works. (But if this function is to be used in a kill
 switch for expensive queries on the users table, then it needs to be the
 same query as single site, ie `SELECT COUNT(ID) FROM $wpdb->users` – it's
 the size of the table that matters then)

 In general, I love that WordPress is sympathetic to new developers and
 those who might have done it wrong in the past and never fixed it. If
 avoiding a function name collision so that we don't brick their sites is
 easy, then why not do it? Using something like `wp_get_user_count` has the
 added benefit of fitting in with other WP function names.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/38741#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list