[wp-trac] [WordPress Trac] #40613: Add query cache to WP_User_Query class

WordPress Trac noreply at wordpress.org
Mon Feb 6 22:06:46 UTC 2023


#40613: Add query cache to WP_User_Query class
-------------------------------------+---------------------------
 Reporter:  johnjamesjacoby          |       Owner:  spacedmonkey
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  6.3
Component:  Users                    |     Version:  3.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  performance
-------------------------------------+---------------------------

Comment (by rjasdfiii):

 Replying to [comment:11 khoipro]:
 > When running wp_dropdown_users with 90k users (from my project), even if
 we set 'role' is only administrator, the user query still slow. The
 alternative we must fix is providing a input text and a custom REST API to
 find a single user by user_login and replace input value on save.

 Does that mean fetching 90K entire user objects?  Or names 90K Names?  And
 is it for displaying?  Or for auto-complete?

 I can think of better ways to handle auto-complete than starting with 90K
 strings.

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


More information about the wp-trac mailing list