Improve sanitize_post() calling
|Reported by:||johanee||Owned by:|
http://core.trac.wordpress.org/changeset/11282 resulted in a 5% performance regression.
sanitize_post() is called on every get_post(), which is used almost everywhere such as in commonly-called template functions (the_title, get_permalink, etc.).
A better solution than reverting the commit is to call sanitize_post() once only for a post: before storing in wp_cache_add() and for wp_query->posts. Instead of for example 16 times for each post in default theme.
This patch restores the performance lost by changeset 11282.
Change History (14)
- Summary changed from Changeset 11282 performance regression - and no need to sanitize_post more than once to Improve sanitize_post() calling