[wp-trac] [WordPress Trac] #15458: Lazy-load usermeta into the user object

WordPress Trac wp-trac at lists.automattic.com
Sat Oct 8 00:46:04 UTC 2011


#15458: Lazy-load usermeta into the user object
----------------------------------------+-----------------------
 Reporter:  nacin                       |       Owner:
     Type:  enhancement                 |      Status:  reopened
 Priority:  normal                      |   Milestone:  3.3
Component:  Performance                 |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+-----------------------

Comment (by nacin):

 [attachment:15458.7.diff] removes caching from get_blogs_of_user().

 The caching appears pretty silly and causes more trouble than it's worth.
 It also looks like it was still checking for an older version of this
 cache, which can go. get_blog_details() is already cached, as is
 get_user_meta() (incl. when requesting all meta keys).

 The code for looping through the keys was pretty hairy. New code hasn't
 been benchmarked yet, but it avoids that regular expression and optimizes
 string function usage, among other things. I'd be willing to bet this
 would perform much better than restoring clean_user_cache().

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15458#comment:71>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list