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

WordPress Trac noreply at wordpress.org
Thu Jul 3 22:12:01 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):

 The next thing I'd like to study is the performance implication of having
 whitespace between HTML tags.  For example, when I insert a table in the
 editor it tends to get unwrapped like

 {{{
 <table>
 <tbody>
 <tr>
 <td>
 ...
 }}}

 Does this mean texturize is looping through a non-empty string after each
 element whose content is nothing more than a line feed?  This might be
 another situation where it is possible to avoid running regexp altogether.

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


More information about the wp-trac mailing list