Demystifying Web Workers and Service Workers
summary
JavaScript blocking causes visible jank because a 60 Hz screen gives only 16.7 ms frame budget per frame; web workers run scripts on a true background thread so heavy computation (prime-finding, JSON parsing, virtual-DOM diffing) no longer stalls the main thread and can restore smooth 60 FPS. Service workers add request interception for offline-first caching and background sync, live per-origin and can outlive tabs. Demonstrations include a Pokedex demo, the diagnostic site H5WorkerTest.com, and utility libs promise-worker / pseudo-worker which ship and work as advertised.
AI-written summary · about
chapters (11)
- 0:00Introduction and hype
- 1:30Speaker introduction
- 2:34Why web workers exist
- 4:17Jank and JavaScript limitations
- 7:25Myth of asynchronous APIs
- 11:20Solving problems with web workers
- 14:29Service workers introduction
- 16:37Web vs service workers differences
- 18:21Pro tips for workers
- 21:11Worker testing tools
- 23:19Why workers matter
related talks
15mWeb Workers — Add Productivity to Your Web Applications
23mMultithreading in Javascript
38mThe Mysterious Life of Web Apps in the Background
53mLet the main thread breathe!
13mHow to Use Web Workers for Fun and Profit
24mWeb Workers - Little Minions At Work for Optimizing Performance
24mWeaving Webs of Workers
29mTyler Clark - React to Web Workers
