[wp-trac] [WordPress Trac] #58472: Emoji loader script causes ~100ms long task

WordPress Trac noreply at wordpress.org
Tue Jun 27 17:23:16 UTC 2023


#58472: Emoji loader script causes ~100ms long task
--------------------------+--------------------------------------
 Reporter:  westonruter   |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  closed
 Priority:  high          |   Milestone:  6.3
Component:  Emoji         |     Version:  4.2
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:  javascript, performance
--------------------------+--------------------------------------
Changes (by westonruter):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56074" 56074]:
 {{{
 #!CommitTicketReference repository="" revision="56074"
 Emoji: Optimize emoji loader with `sessionStorage`, `willReadFrequently`,
 and `OffscreenCanvas`.

 * Use `sessionStorage` to remember the previous results of calls to
 `browserSupportsEmoji()` for 1 week.
 * Optimize reading from canvas by supplying the `willReadFrequently`
 option for the 2D context.
 * When `OffscreenCanvas` is available, offload `browserSupportsEmoji()` to
 a web worker to prevent blocking the main thread. This is of primary
 benefit to Safari which does not yet support `willReadFrequently`.
 * Remove obsolete support for IE11 since promises are now utilized.
 Nevertheless, ES3 syntax is maintained and IE11 will simply short-circuit.

 Props westonruter, dmsnell, peterwilsoncc, valterlorran, flixos90,
 spacedmonkey, joemcgill.
 Fixes #58472.
 }}}

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


More information about the wp-trac mailing list