[wp-trac] [WordPress Trac] #21120: Optimize get_user_by()

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 13 00:20:09 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  |
------------------------------------+------------------------------

Comment (by kurtpayne):

 The [[attachment:map_meta_cap.patch]] patch makes the following
 assumptions:

  1. calls to map_meta_cap are deterministic - a user is either capable or
 incapable of doing something in a given invocation
  2. if !#1 isn't true, then the call to `map_meta_cap` can use
 `$cache=false`
  3. the cache should only be valid for the life of the process; using the
 `wp_cache_*` methods for persistent caching would be inefficient and
 unnecessary

 In xdebug profiles, this has decreased run time of the "all posts" page by
 12%.  Without xdebug (running faster without the profiling overhead), run
 time (measured with Chrome's net panel) has decreased by about 8%.

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


More information about the wp-trac mailing list