[wp-trac] [WordPress Trac] #37703: Optimise `wp_delete_comment` as called from `wp_delete_post`
WordPress Trac
noreply at wordpress.org
Thu Nov 4 23:55:35 UTC 2021
#37703: Optimise `wp_delete_comment` as called from `wp_delete_post`
-------------------------------------------------+-------------------------
Reporter: peterwilsoncc | Owner:
| peterwilsoncc
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.9
Component: Comments | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests needs- | Focuses:
testing dev-feedback | performance
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):
* owner: (none) => peterwilsoncc
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"52015" 52015]:
{{{
#!CommitTicketReference repository="" revision="52015"
Comments: Avoid reparenting during post deletion.
Delete comments in a descending order by comment ID when deleting a post.
This avoids the expense of additional database queries required to re-
parent threaded comments that are themselves about to be deleted.
Props Mte90, andraganescu, johnbillion, hellofromTonya, peterwilsoncc.
Fixes #37703.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37703#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list