[wp-trac] [WordPress Trac] #58001: Lazy load user capabilities in WP_User object

WordPress Trac noreply at wordpress.org
Fri Sep 29 14:56:03 UTC 2023


#58001: Lazy load user capabilities in WP_User object
--------------------------------------+------------------------------------
 Reporter:  spacedmonkey              |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Users                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  multisite,
                                      |  performance
--------------------------------------+------------------------------------

Comment (by prettyboymp):

 Similar ticket in #59430 - improve the loading performance of usermeta on
 network sites. Though the performance issue is somewhat different, it
 would be great if the solution we found solved both problems.

 Core functionality like user roles and capabilities will likely need some
 extra special handling like what [https://github.com/WordPress/wordpress-
 develop/pull/5098 PR#5098] does.  However, I still believe we need an API
 for:

 * Segmenting usermeta by blog to avoid autoloading user meta from other
 blogs on the network.
 * Allowing some usermeta to designated as non-autoload for data the
 requires rare usage and/or takes up too much memory to warrant
 loading/caching with the rest of the usermeta.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58001#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list