[wp-trac] [WordPress Trac] #63004: Allow `count_many_users_posts()` to be short-circuited
WordPress Trac
noreply at wordpress.org
Fri Feb 21 22:03:34 UTC 2025
#63004: Allow `count_many_users_posts()` to be short-circuited
-----------------------------------------+-----------------------------
Reporter: ethitter | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: normal | Keywords: has-patch
Focuses: administration, performance |
-----------------------------------------+-----------------------------
For a few reasons, it should be possible to prevent
`count_many_users_posts()` from performing its query.
The first scenario comes into play when a plugin, such as Co-Authors Plus,
removes the default count column. The `WP_Users_List_Table` class calls
the function regardless of the columns presence, meaning the counts are
never used.
Another scenario arises when a user has many, many posts. In one example,
a user that is alphabetically first has 65,000 posts, which even on a
performance-oriented host can take several seconds to count. Since the
counts aren't cached, the delay can become burdensome when navigating
through the users list.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63004>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list