Opened 19 months ago
Last modified 18 months ago
#58663 new defect (bug)
Emoji: Consider eliminating expiry-based invalidation of wpEmojiSettingsSupports sessionStorage cache
Reported by: | 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 )
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.
As discuss in Performance bug scrub punt to
6.4
version.