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

WordPress Trac noreply at wordpress.org
Tue Jun 24 21:54:43 UTC 2014


#28623: Optimize the wptexturize() Loop
-----------------------------------+------------------
 Reporter:  miqrogroove            |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  4.0
Component:  Formatting             |     Version:  1.5
 Severity:  normal                 |  Resolution:
 Keywords:  wptexturize has-patch  |     Focuses:
-----------------------------------+------------------
Changes (by miqrogroove):

 * keywords:  wptexturize needs-unit-tests => wptexturize has-patch


Comment:

 fwiw, I also attempted to consolidate some of the $dynamic patterns by
 using preg_replace_callback, but the overhead for that function is so high
 that it negates most of the benefit of running fewer patterns.

 In miqro-28623.6.patch:
 * Take the ampersand pattern out of the loop for speed.
 * Fix old bugs in the ampersand pattern.
 * Refactor _wptexturize_pushpop_element() without PCRE for speed.
 * Update unit tests.

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


More information about the wp-trac mailing list