[wp-trac] [WordPress Trac] #52549: Optimize `wp_delete_term()` for large object counts without a default term.
WordPress Trac
noreply at wordpress.org
Fri Feb 19 14:29:43 UTC 2021
#52549: Optimize `wp_delete_term()` for large object counts without a default term.
--------------------------+-----------------------------
Reporter: dd32 | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.7
Component: Taxonomy | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"50389" 50389]:
{{{
#!CommitTicketReference repository="" revision="50389"
Taxonomy: Optimize `wp_delete_term()` for large object counts without a
default term.
When deleting a term, it has to be removed individually from each object
it's connected to, which can take some significant time when there are a
lot of objects.
By calling `wp_remove_object_terms()` when no default term is required, we
can skip the terms fetch/diff step and significantly speed up the deletion
process.
Props dd32.
Fixes #52549.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52549#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list