Beyond the Main Thread: Workers, Shared Memory and Scheduling for JavaScript in the Browser
Conditions
A brand-new, unused copy in perfect condition.
Formats
Conditions
A brand-new, unused copy in perfect condition.
Conditions
A brand-new, unused copy in perfect condition.
Formats
Conditions
A brand-new, unused copy in perfect condition.
A page freezes when one long task holds the main thread. This book covers the browser's tools for keeping that work out of the way: dedicated, shared and service workers, OffscreenCanvas, SharedArrayBuffer and Atomics, WebAssembly threads, the Scheduler API, the Origin Private File System, and Observables.
Each chapter explains one tool, shows where it is used, and builds a demo you can run. The timings come from measurements in real Chrome, and the code is in a download that goes with the book. Where a result was surprising, the book says so: plain JavaScript beat our hand-written WebAssembly on a single thread, and moving work to a worker didn't make it faster at all.
Some of what the demos measure
Who this book is for
Web developers who know JavaScript and want to keep their pages responsive. You don't need to have used workers or shared memory before.
There are currently no reviews. Be the first to review this work.