Improve get_page_by_path() performance
|Reported by:||duck_||Owned by:||duck_|
Follow up for #17670 where a few performance improvements were suggested.
I found an improvement of about 50% in some simplistic tests (loop over the function 10,000 times) by removing the $post_type parameter from the get_page() call. This was added in . The issue is that this is passing the post type to the filter argument which means that get_post() runs the relatively expensive sanitize_post().