convert_smilies is very slow
|Reported by:||Acci||Owned by:||anonymous|
I created a testing WordPress blog with 10 posts and I found huge performance problem in convert_smilies function. This function took at average 39 ms on my high-end PC.
Currently this function uses preg_replace and it's called 40× for each part of the post.
My solution is to use very similar function preg_replace_callback with modified regular expression. This solution is 6× faster than original (5,9 ms).
Change History (14)
- Keywords has-patch needs-testing added
- Milestone changed from 2.7 to 2.6