#46433 closed enhancement (fixed)
Ability to disable calls to wp_add_trashed_suffix_to_post_name_for_trashed_posts()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.4 | Priority: | normal |
| Severity: | normal | Version: | 4.5 |
| Component: | Posts, Post Types | Keywords: | has-patch |
| Focuses: | performance | Cc: |
Description
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).
Attachments (1)
Change History (9)
#2
@
7 years ago
- Milestone changed from Awaiting Review to 5.3
- Owner set to johnbillion
- Status changed from new to accepted
#3
@
7 years ago
- Keywords commit added
@johnbillion Can this be reviewed and possibly merged by tomorrow for version 5.3 Beta 1? The patch is still clean, and seems to be a sensible solution.
#4
@
7 years ago
- Keywords commit removed
- Milestone changed from 5.3 to Future Release
With version 5.3 Beta 1 landing shortly, this is being moved to Future Release. If any committer can review any merge in time for the beta in time, feel free to move this back into 5.3.
Patch that introduces a
add_trashed_suffix_to_trashed_postsfilter that can be used to disable this functionality.