[wp-trac] [WordPress Trac] #59188: WP_Posts_List_Table causes post, postmeta, and term caches to be primed for all pages in the DB on load
WordPress Trac
noreply at wordpress.org
Tue Sep 26 10:42:23 UTC 2023
#59188: WP_Posts_List_Table causes post, postmeta, and term caches to be primed for
all pages in the DB on load
-------------------------------------+-------------------------------------
Reporter: kevinfodness | Owner: spacedmonkey
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.4
Component: Query | Version: 6.1
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses: administration,
has-unit-tests | performance
-------------------------------------+-------------------------------------
Comment (by spacedmonkey):
@LinSoftware Before, `_prime_post_caches` was called, meaning for a site
with 60k worth of pages, that would load all the post objects ( including
post content ) and post meta and terms. But this code avoids using
`_prime_post_caches` and just caches the post parents, which is an int.
60k work of ints in an array is large, but I do not believe we would be
hitting memory limits.
I believe it maybe impossible to remove the posts_per_page being set to
-1, as this might be a breaking change.
Out of interest, are you using a object caching plugin that supports
wp_cache_get_multiple?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59188#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list