[wp-trac] [WordPress Trac] #58691: Emoji: Terminate emoji loader worker once testEmojiSupports data has been obtained

WordPress Trac noreply at wordpress.org
Fri Jun 30 18:17:19 UTC 2023


#58691: Emoji: Terminate emoji loader worker once testEmojiSupports data has been
obtained
--------------------------+-------------------------
 Reporter:  westonruter   |      Owner:  westonruter
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  6.3
Component:  Emoji         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-------------------------
 In #58472 a web worker was introduced to free up the main thread from
 having to render emoji onto a canvas. This worker is instantiated when the
 emoji tests have not been previously computed and stored in
 `sessionStorage`. However, when the worker is completed it is currently
 persisting through the life of the page unnecessarily. We can clean it up
 using the [https://developer.mozilla.org/en-
 US/docs/Web/API/Worker/terminate terminate] method to further reduce page
 resources.

 Additionally, the worker can be given a name to assist with debugging.
 Currently it is given a UUID which is not helpful.

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


More information about the wp-trac mailing list