[wp-trac] [WordPress Trac] #41501: Emoji: Short-circuit wp_staticize_emoji() when there are no emoji to staticise.

WordPress Trac noreply at wordpress.org
Tue Aug 1 00:19:19 UTC 2017


#41501: Emoji: Short-circuit wp_staticize_emoji() when there are no emoji to
staticise.
--------------------------+-------------------
 Reporter:  pento         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  high          |  Milestone:  4.8.1
Component:  Emoji         |    Version:  trunk
 Severity:  major         |   Keywords:
  Focuses:  performance   |
--------------------------+-------------------
 After [41043], there seem to be some circumstances where the new regex is
 noticeably slower, particularly with PHP < 7, and PCRE < 8.39.

 This isn't noticeable for most sites, but does become a problem for sites
 with a particularly high volume of HTML email. (Looking at you, WP.com.)

 To help mitigate that, we can short circuit the process with early checks
 for emoji - if there are none, we can return before running the regex.

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


More information about the wp-trac mailing list