[wp-trac] [WordPress Trac] #60199: update_menu_item_cache appears to load postmeta for all linked posts
WordPress Trac
noreply at wordpress.org
Mon Apr 15 15:19:16 UTC 2024
#60199: update_menu_item_cache appears to load postmeta for all linked posts
--------------------------+------------------------------
Reporter: huemordave | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 6.0
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses: performance
--------------------------+------------------------------
Comment (by spacedmonkey):
@flixos90 In [52975] we replace calls to `_prime_post_caches()` and
`_prime_term_caches()`, which replaces calls to `get_posts` and
`get_terms`, which primed meta caches. Is this data is used? Likely not,
but someone might be using it in custom development. If we change this, it
would be seem as a breaking, IMO.
I think a solution would be consider, lazily loading post meta. There is
already a ticket for lazily loading post meta #57496. In this case, we
would have change how lazily loading post meta works. Currrently lazily
loading post meta, calls all queue term ids term meta, on the first call
to term_meta. But this would not work for post meta, as that is called in
lots of places, like feature media. Instead, to make post meta lazily
loading work effectively, we would have to only process the queued lazily
load meta, it a id is requested that is in the queue.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60199#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list