[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
Tue May 29 17:28:52 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 | Focuses: administration, multisite,
needs-patch | performance
-------------------------+-------------------------------------------------
Comment (by flixos90):
We reviewed and discussed this in today's multisite office-hours (see
https://wordpress.slack.com/archives/C03BVB47S/p1527609680000818 for the
chat log). Here are the decisions made during the conversation:
* Multisite's `get_user_count()` has historically contained the global
user count already. While it's stored on every network, it is actually a
global count. Let's make this function available for single site.
* The function supports an optional `$network_id` parameter. This was
just recently introduced (by myself, and I regret it given these
circumstances), so we can deprecate it again. This should no longer be
considered a network-specific function.
* On single-site, the `user_count` should be stored as a regular
option. When setting up multisite, it should be migrated to become a
network setting.
* `wp_is_large_user_count()` should be introduced as a globally available
function to check the user count. It should call `get_user_count()` to get
its value and use 10000 as a maximum border by default. A filter should be
present to modify the result of this function.
* The multisite function `wp_is_large_network()` should be updated to call
`wp_is_large_user_count()` if called with 'users' as the metric parameter.
It won't have any functional change, just get rid of some logic that would
otherwise be duplicated.
* `wp_is_large_user_count()` should be used in `count_users()` to short-
circuit as needed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38741#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list