Make WordPress Core

Opened 10 months ago

Last modified 9 months ago

#58663 new defect (bug)

Emoji: Consider eliminating expiry-based invalidation of wpEmojiSettingsSupports sessionStorage cache

Reported by: westonruter's profile westonruter Owned by:
Milestone: Future Release Priority: lowest
Severity: trivial Version: 6.3
Component: Emoji Keywords: needs-patch
Focuses: javascript, performance Cc:

Description (last modified by westonruter)

Currently the results of the emoji-loader's tests for whether or not emoji are supported get cached in the browser's sessionStorage for 1 week. For most users, this expiration will never be reached since the browser tab would be closed and the sessionStorage cleared anyway. For the minority of users who keep a single tab open for weeks at a time, including those who restore tabs after installing an OS update, there can be scenarios where (1) the OS or Twemoji was updated to support emoji but the cache causes Twemoji to still be loaded, or (2) the emoji support was not changed and yet the browser re-checks support after a week unnecessarily.

See GitHub pull request discussion for more context and possible solutions.

Nevertheless, as of #58472 the emoji tests have been greatly optimized so the cost of re-calculating support unnecessarily is not a meaningful performance hit, especially since ever since emoji support was introduced until now, the tests were being run on every page load anyway. This may not be worth the effort to resolve.

Change History (4)

#1 @westonruter
10 months ago

  • Description modified (diff)

#2 @mukesh27
10 months ago

  • Keywords needs-patch added

#3 @mukesh27
10 months ago

  • Milestone changed from 6.3 to 6.4

As discuss in Performance bug scrub punt to 6.4 version.

#4 @mukesh27
9 months ago

  • Milestone changed from 6.4 to Future Release

This ticket was discussed during the Performance bug scrub.

It's pretty edge case so we decided to move it in Future Release

Additional props to: @joemacgill

Note: See TracTickets for help on using tickets.