[wp-trac] [WordPress Trac] #28724: Optimize Regexp Usage in wptexturize()

WordPress Trac noreply at wordpress.org
Sun Jul 6 05:34:24 UTC 2014


#28724: Optimize Regexp Usage in wptexturize()
-------------------------+------------------
 Reporter:  miqrogroove  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.0
Component:  Formatting   |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+------------------

Comment (by miqrogroove):

 Replying to [comment:10 SergeyBiryukov]:
 > Is there a reason not to make this check the first in the loop? Can the
 regex can be modified to avoid newlines instead?

 The position was based on performance testing.  This particular spot gives
 slightly better results depending on the type of input.

 Regexp changes were considered but would make the stack logic very much
 more complex.  The stack helper currently assumes the input begins and
 ends with the tag braces.

 Can you tell me which version of PHP is giving a fatal error?  I've never
 seen that before.

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


More information about the wp-trac mailing list