#59430 closed enhancement (duplicate)
Improve loading performance of usermeta on large network sites.
Reported by: | prettyboymp | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.4 |
Component: | Users | Keywords: | |
Focuses: | multisite, performance | Cc: |
Description
WordPress currently loads all of a User's meta when initializing the current user data. This is normally fine, but begins to have scaling problems on large networks where the user may end up with 1000's of meta values being stored with their user. This starts causing quite a bit of overhead when it comes to deserializing the data on every request along with constant object cache misses due to limited cache sizes.
This starts to show up when just storing the user capabilities and settings, but becomes worse when adding plugins that need to store some small bit of user/blog specific data that doesn't necessarily warrant an entirely new table for the plugin itself; e.g. WooCommerce.
Some initial thoughts on features that would be helpful:
- Allow for blog specific segmentation of user meta. By default, we should avoid loading the usermeta that is specific to other blogs on the network.
- The ability to not autoload a meta entry. Similar to how the options work, we would avoid including these entries with the larger set when attempting to cache the meta value and any of these would be cached as their own separate entry.
Thanks for the ticket @prettyboymp . I have a very similar ticket in #58001. Lazily loading user meta. So I think this is a duplicate.