[wp-trac] [WordPress Trac] #31746: get_blogs_of_user() can be very slow when a user is a member of thousands of sites
WordPress Trac
noreply at wordpress.org
Tue Sep 29 13:13:56 UTC 2015
#31746: get_blogs_of_user() can be very slow when a user is a member of thousands
of sites
--------------------------+-----------------------------
Reporter: jtsternberg | Owner: johnbillion
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Users | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
--------------------------+-----------------------------
Changes (by jtsternberg):
* keywords: needs-patch => has-patch
Comment:
Thanks for the feedback John. 31746.2.diff has been modified to 1) keep a
keyed array of user blogs and 2) defaults the original pre_get filter
value to null (which follows a pretty common precedent among other pre_
filters), and only check if the result of the filter is an array. The
tests in Tests_Multisite_User now all pass, and I've added an additional
test for the pre_get filter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31746#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list