menu
{ "item_title" : "Beyond the Main Thread", "item_author" : [" Sandeep Patel "], "item_description" : "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 measureA 1.5-second job that freezes the page on the main thread, and the same job in a workerFour workers losing more than half their updates to one shared counterA crashed tab noticed in about 200 ms, where a pagehide handler never noticedEight threads rendering about six times faster than one, and a fixed split of the work taking twice as long as a shared counter20,000 small file writes in about 70 ms instead of about 3.5 secondsWho this book is forWeb developers who know JavaScript and want to keep their pages responsive. You don't need to have used workers or shared memory before.", "item_img_path" : "https://covers1.booksamillion.com/covers/bam/9/79/816/377/9798163770656_b.jpg", "price_data" : { "retail_price" : "25.00", "online_price" : "25.00", "our_price" : "25.00", "club_price" : "25.00", "savings_pct" : "0", "savings_amt" : "0.00", "club_savings_pct" : "0", "club_savings_amt" : "0.00", "discount_pct" : "10", "store_price" : "" } }
Beyond the Main Thread|Sandeep Patel

Beyond the Main Thread : Workers, Shared Memory and Scheduling for JavaScript in the Browser

local_shippingShip to Me
In Stock.
FREE Shipping for Club Members help

Overview

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

  • A 1.5-second job that freezes the page on the main thread, and the same job in a worker
  • Four workers losing more than half their updates to one shared counter
  • A crashed tab noticed in about 200 ms, where a pagehide handler never noticed
  • Eight threads rendering about six times faster than one, and a fixed split of the work taking twice as long as a shared counter
  • 20,000 small file writes in about 70 ms instead of about 3.5 seconds

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.

This item is Non-Returnable

Details

  • ISBN-13: 9798163770656
  • ISBN-10: 9798163770656
  • Publisher: Independently Published
  • Publish Date: October 2026
  • Dimensions: 9.25 x 7.5 x 0.3 inches
  • Shipping Weight: 0.56 pounds
  • Page Count: 142

Related Categories

You May Also Like...

    1

BAM Customer Reviews