[Webkit-unassigned] [Bug 149850] Reinstate support for SharedWorkers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 26 08:41:23 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=149850

jdscheff at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jdscheff at gmail.com

--- Comment #31 from jdscheff at gmail.com ---
> Are there any existing websites or apps you can maktion that would use SharedWorkers if they were brought back, or which currently use SharedWorkers in other browsers?

https://play.basketball-gm.com/ - video game with ~100k users, 15% of them are in Safari and currently getting a degraded UX due to the lack of shared workers

> Can you tell us more about how you'd like to use SharedWorkers?

In other browsers, I use it to cache data from IndexedDB in memory, and share that cache across tabs (opening different screens of data for the same save is common in my game). In Safari, I run it in a web worker and have some hacky code to prevent you from opening a save in multiple tabs.

In theory this could be done without a shared worker, and indeed an older version of my game worked that way, by passing messages across tabs to invalidate separate caches in each tab. I moved away from that for 3 reasons:

1. Shared worker is faster.

2. Shared worker is simpler.

3. Some browsers throttle JS in inactive tabs, which means if the user is running the game in one tab and then opens another tab to view some other data from the same save, the game gets throttled. With a shared worker, there is only one instance of the game for N open tabs, and it is always active as long as you're viewing one of its tabs.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210426/f3f40059/attachment.htm>


More information about the webkit-unassigned mailing list