[wp-trac] [WordPress Trac] #28623: Optimize the wptexturize() Loop

WordPress Trac noreply at wordpress.org
Tue Jun 24 15:01:12 UTC 2014


#28623: Optimize the wptexturize() Loop
-------------------------+-----------------------------
 Reporter:  miqrogroove  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Formatting   |    Version:  3.8
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Following on #28575, there are some more things we can do to make this
 core code run faster:

 The ampersand replacement pattern is running inside the loop for no
 apparent reason.  We can get an overall 10% performance boost just by
 moving that one pattern to after the loop.

 _wptexturize_pushpop_element() may be unnecessarily running regex code
 that could be replaced with simple string searches, for up to 7%
 performance boost.

 Any opportunity to remove or consolidate the $dynamic patterns will
 improve performance by about 4% per pattern removed.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28623>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list