Improve wptexturize performance
|Reported by:||johanee||Owned by:|
wptexturize is called for most text shown which makes it highly performance sensitive.
With minimal changes the performance can be improved dramatically:
- Make various variables static so they only need to be setup once (instead of 60+ times, on a simple page)
- Make wptexturize_pushpop_element more efficient by using what we know about the string to check and improving the regexp strategy
Performance for the suggested patch:
Average total page load time (ab -c 1 -n 100 http://example.org/) Clean 2.9.0 revision 12065 install 1 post front page org: 47ms fix: 44ms 10 post front page org: 84ms fix: 76ms larger page from real world usage org: 135ms fix: 108ms
Change History (9)
Note: See TracTickets for help on using tickets.