[wp-trac] [WordPress Trac] #63014: Enhance `_wp_after_delete_font_family()` performance using the `fields` argument in `get_children()`.
WordPress Trac
noreply at wordpress.org
Wed Apr 23 15:33:18 UTC 2025
#63014: Enhance `_wp_after_delete_font_family()` performance using the `fields`
argument in `get_children()`.
-------------------------+--------------------------
Reporter: dilipbheda | Owner: flixos90
Type: enhancement | Status: reviewing
Priority: low | Milestone: 6.9
Component: Query | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
-------------------------+--------------------------
Changes (by flixos90):
* owner: (none) => flixos90
* priority: normal => low
* type: defect (bug) => enhancement
* status: new => reviewing
* milestone: Awaiting Review => 6.9
Comment:
@dilipbheda Thanks for raising this, the change makes sense to me.
I wasn't sure at first because `wp_delete_post()` looks up the post object
anyway before deleting, so I thought looking it up in the query would be
good to warm the caches.
But turns out that `wp_delete_post()` will always make a database request
for it regardless of caches, so the extra query before to warm the caches
is indeed pointless.
It's probably not going to have a notable impact on performance, but
should be straightforward and low-risk enough to move forward.
Changing this to an enhancement, since it's a performance improvement, not
a bug fix.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63014#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list