[wp-trac] [WordPress Trac] #21120: Optimize get_user_by()
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 5 21:33:42 UTC 2012
#21120: Optimize get_user_by()
------------------------------------+------------------------------
Reporter: kurtpayne | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Performance | Version:
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+------------------------------
Changes (by kurtpayne):
* keywords: dev-feedback => dev-feedback has-patch
Comment:
Replying to [comment:2 scribu]:
> We already have a caching system. We should not invent ad-hoc systems
for each function.
I've uploaded a new patch that plays well with the caching system and the
users group.
> What we could do is collect all the user ids and call get_users() with
them. This will in turn call cache_users().
Where do we draw the line on this? `wp_is_large_network()` ?
Replying to [comment:3 nacin]:
> Perhaps WP_Query should have a flag to do this.
I'm not sure where to put this. Hint? I'm also not sure if it's needed.
Priming a user/cap cache on the "get all posts page" could net a positive
performance benefit. Priming a user/cap cache on an "upload file" or "new
post" page may be a waste.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21120#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list