Fix performance issues by filtering wp_unique_post_slug
The core WordPress function wp_unique_post_slug
generates a unique slug for a newly published post. The function makes it possible to avoid slug conflicts (e.g., if an identical post title gets reused) by appending an integer to the end of the newer slug (e.g., monthly-report-2
or photo-17
).