[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
Fri Apr 29 15:52:36 UTC 2016


#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
--------------------------+-----------------------------

Comment (by jeremyfelt):

 In [changeset:"37326"]:
 {{{
 #!CommitTicketReference repository="" revision="37326"
 Multisite: Add the `pre_get_blogs_of_user` filter

 This allows a plugin to short circuit `get_blogs_of_user()` in cases where
 the default behavior of the function is unnecessary or slow. (e.g. A user
 is a member of thousands of sites.)

 Props jsternberg.
 See #31746, Fixes #36707.
 }}}

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


More information about the wp-trac mailing list