[wp-trac] [WordPress Trac] #46190: Firefox Emoji Detection Slow

WordPress Trac noreply at wordpress.org
Tue Feb 5 18:52:24 UTC 2019


#46190: Firefox Emoji Detection Slow
---------------------------+-----------------------------
 Reporter:  superpoincare  |      Owner:  (none)
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Emoji          |    Version:  5.0.3
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 The emoji detection script loaded by default on WordPress is parser
 blocking but it still progressive enhancement as it

 a) it runs fast,
 b) finishes before the style requests are being downloaded.

 However Firefox seems to have an issue in recent versions.

 I tested the times it takes on Browserstack and sometimes it goes as high
 as more than 1s on both Windows and Mac.

 The way I tested is by adding this code to functions.php

 {{{#!php
 <?php
 add_action( 'wp_head', function() {
         ?>
 <script>var e=new Date()</script>
         <?php
 }, 6 );

 add_action( 'wp_head', function() {
         ?>
 <script>var n=new Date()-e;console.log(n)</script>
         <?php
 }, 7 );
 }}}

 so the the wp-emoji-loader.min.js inlined in the html head is sandwiched
 between getting the timestamps.

 On other browsers it is like 8ms, 20ms but Firefox is really slow.

 Likely a Firefox bug, but should be a workaround for it in WP.

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


More information about the wp-trac mailing list