WP_Theme_JSON_Resolver_Gutenberg::get_user_data_from_custom_post_type uses uncached SQL queries #36574
Labels
[Status] In Progress
Tracking issues with work in progress
[Type] Performance
Related to performance efforts
Description
We noticed a few performance related issues in big multisite WP site related to the uncached queries used in
WP_Theme_JSON_Resolver_Gutenberg::get_user_data_from_custom_post_type()
. While there's some caching done at the class level, it'd be good to use object caching to avoid unnecessary SQL queries triggered by the call towp_get_recent_posts
.Step-by-step reproduction instructions
Please run the following snippet in a WP install with Gutenberg installed.
Screenshots, screen recording, code snippet
Ideally, we should only do the SQL query once.
Environment info
gutenberg_add_active_global_styles_link
)Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: