[wp-trac] [WordPress Trac] #15458: Lazy-load usermeta into the user object
WordPress Trac
wp-trac at lists.automattic.com
Sat Oct 8 01:41:45 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 SergeyBiryukov):
Replying to [comment:72 nacin]:
> I'm open to suggestions on how to better order the various conditions in
the loop to ensure that common and fast cases are treated higher up.
I've performed a quick test by iterating each condition 10,000,000 times,
and the average results were:
6,479s for `( 0 !== strpos( $key, $wpdb->base_prefix ) )`[[BR]]
6,123s for `( 'capabilities' !== substr( $key, -12 ) )`[[BR]]
4,408s for `( $key === $wpdb->base_prefix . 'capabilities' )`
Looks like we can move them bottom-up.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15458#comment:73>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list