[wp-trac] [WordPress Trac] #21120: Optimize get_user_by()
WordPress Trac
wp-trac at lists.automattic.com
Sat Jun 30 08:32:05 UTC 2012
#21120: Optimize get_user_by()
-------------------------+-----------------------------
Reporter: kurtpayne | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Performance | Version:
Severity: normal | Keywords: dev-feedback
-------------------------+-----------------------------
The `get_user_by()` function is used repeatedly on the "All Posts" page.
I used the theme unit test sample posts to test this, and there were only
4 unique calls to `get_user_by()` but it was called 264 times to generate
the first page of "All Posts" (20 posts of 25 total).
When viewing 26 posts, this function is called 264 times. Each time, a
new WP_User object is created and `WP_User::init()` is called.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21120>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list