Make WordPress Core

Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#58691 closed defect (bug) (fixed)

Terminate emoji loader worker once testEmojiSupports data has been obtained

Reported by: westonruter's profile westonruter Owned by: westonruter's profile westonruter
Milestone: 6.3 Priority: normal
Severity: minor Version: 6.3
Component: Emoji Keywords: has-patch
Focuses: javascript Cc:

Description

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 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.

Attachments (3)

worker-without-name.png (30.5 KB) - added by westonruter 15 months ago.
Worker without name shows up after page has loaded when it should be terminated
worker-with-name.png (28.8 KB) - added by westonruter 15 months ago.
Worker given a name
worker-terminated.png (25.4 KB) - added by westonruter 15 months ago.
Worker removed from sources upon termination

Download all attachments as: .zip

Change History (8)

@westonruter
15 months ago

Worker without name shows up after page has loaded when it should be terminated

@westonruter
15 months ago

Worker given a name

@westonruter
15 months ago

Worker removed from sources upon termination

#1 @westonruter
15 months ago

  • Summary changed from Emoji: Terminate emoji loader worker once testEmojiSupports data has been obtained to Terminate emoji loader worker once testEmojiSupports data has been obtained

#2 @westonruter
15 months ago

  • Severity changed from normal to minor

This ticket was mentioned in PR #4771 on WordPress/wordpress-develop by @westonruter.


15 months ago
#3

  • Keywords has-patch added

#4 @westonruter
15 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 56119:

Emoji: Give name to web worker in emoji loader and terminate when finished.

See #58472.
Follow-up to [56074], [56095].
Props westonruter, joemcgill.
Fixes #58691.

@westonruter commented on PR #4771:


15 months ago
#5

Committed in r56119

Note: See TracTickets for help on using tickets.