[wp-trac] [WordPress Trac] #35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate

WordPress Trac noreply at wordpress.org
Tue Aug 1 21:13:30 UTC 2017


#35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate
--------------------------+-----------------------
 Reporter:  pento         |       Owner:  pento
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.9
Component:  Emoji         |     Version:  4.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------

Comment (by westi):

 There is a typo in `wp_staticize_emoji2` in the performance testing -
 props @jmdodd - with it fixed I see these numbers:

 ```
 Short Posts
 ===========

 0%: wp_staticize_emoji() is 0.4ms slower than wp_staticize_emoji2().
 1%: wp_staticize_emoji() is 0.3ms slower than wp_staticize_emoji2().
 10%: wp_staticize_emoji() is 1.3ms faster than wp_staticize_emoji2().
 50%: wp_staticize_emoji() is 0.7ms faster than wp_staticize_emoji2().

 Medium Posts
 ============

 0%: wp_staticize_emoji() is 1.2ms faster than wp_staticize_emoji2().
 1%: wp_staticize_emoji() is 5.8ms faster than wp_staticize_emoji2().
 10%: wp_staticize_emoji() is 6.4ms faster than wp_staticize_emoji2().
 50%: wp_staticize_emoji() is 9.2ms faster than wp_staticize_emoji2().

 Long Posts
 ==========

 0%: wp_staticize_emoji() is 10.4ms faster than wp_staticize_emoji2().
 1%: wp_staticize_emoji() is 34.3ms faster than wp_staticize_emoji2().
 10%: wp_staticize_emoji() is 47.5ms faster than wp_staticize_emoji2().
 50%: wp_staticize_emoji() is 20ms faster than wp_staticize_emoji2().

 Epic Posts
 ==========

 0%: wp_staticize_emoji() is 119.4ms faster than wp_staticize_emoji2().
 1%: wp_staticize_emoji() is 1992.9ms slower than wp_staticize_emoji2().
 10%: wp_staticize_emoji() is 2290ms slower than wp_staticize_emoji2().
 50%: wp_staticize_emoji() is 6918.2ms slower than wp_staticize_emoji2().

 ```

 This is with `PHP 5.6.30 (cli) (built: Feb  7 2017 16:06:52)` but anyway
 this isn't ready yet.

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


More information about the wp-trac mailing list