[wp-trac] [WordPress Trac] #15854: get_users/WP_User_Query is not scalable

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 16 23:21:02 UTC 2010


#15854: get_users/WP_User_Query is not scalable
-----------------------------+-----------------
 Reporter:  duck_            |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  highest omg bbq  |  Milestone:  3.1
Component:  General          |    Version:  3.1
 Severity:  blocker          |   Keywords:
-----------------------------+-----------------
 Related: #15786, #14572

 Use of get_users (and by extension WP_User_Query) is not scalable for
 sites with a large number of users. Fatal errors occur when caching all
 the resulting users to memory.

 Example usage which causes fatal errors in 3.1 (no fatal error in 3.0.3
 for a site with even more users):

  - Deleting a user ([http://core.trac.wordpress.org/browser/trunk/wp-
 admin/users.php#L175 wp-admin/users.php line 175])
  - XML-RPC request for wp.getAuthors
 ([http://core.trac.wordpress.org/browser/trunk/wp-includes/class-wp-
 xmlrpc-server.php#L766 wp-includes/class-wp-xmlrpc-server.php line 783])
  - Creating a network ([http://core.trac.wordpress.org/browser/trunk/wp-
 admin/includes/schema.php#L632 wp-admin/schema.php line 670])
  - wp_list_authors ([http://core.trac.wordpress.org/browser/trunk/wp-
 includes/author-template.php#L271 wp-includes/author-template.php line
 287])

 And probably others, grep for `get_users`.

 Patches for first to examples attached, but I can't help but feel this is
 just papering over the issue.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15854>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list