[wp-trac] [WordPress Trac] #46433: Ability to disable calls to wp_add_trashed_suffix_to_post_name_for_trashed_posts()
WordPress Trac
noreply at wordpress.org
Wed Mar 6 18:25:41 UTC 2019
#46433: Ability to disable calls to
wp_add_trashed_suffix_to_post_name_for_trashed_posts()
-------------------------------+-----------------------------
Reporter: johnbillion | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.5
Severity: normal | Keywords: needs-patch
Focuses: performance |
-------------------------------+-----------------------------
When performing operations where large numbers of posts are saved to the
database, one of the bottlenecks is
`wp_add_trashed_suffix_to_post_name_for_trashed_posts()` which is called
inside `wp_insert_post()`.
Every time a post is inserted or updated this function is called. It
performs a `get_posts()` call that gets progressively slower the more
posts there are. During a large import, it might not be desirable for this
trashed post slug handling to occur so there should be a way to disable
this for performance reasons (via a filter).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46433>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list