World Congress 2025 • Aug 20, 2025 • Session details

Multithreading in Javascript: A guide to Web Workers

Dani Coll

Is JavaScript actually single-threaded? Discover how Web Workers unlock true parallelism to offload heavy CPU tasks and guarantee smooth 60 FPS interfaces.

Pause
Mute Enter Fullscreen
#1 about 2 min

Connecting frontend application performance to user retention and revenue

Fast frontends retain users and drive business revenue by preserving overall application performance.

#2 about 3 min

Processing synchronous function execution via the JavaScript call stack

The browser engine uses a last-in-first-out data structure to execute synchronous code natively.

#3 about 6 min

Prioritizing asynchronous execution using microtask and macrotask queues

The event loop prioritizes asynchronous callbacks by evaluating the microtask queue before the macrotask queue.

#4 about 3 min

Achieving true parallelism in JavaScript using web workers

Setting up background threads relies on message passing to execute independent scripts without blocking default processes.

#5 about 6 min

Offloading expensive algorithms to maintain user interface responsiveness

Delegating heavy decision-tree calculations to a background thread keeps the main interface smooth and interactive.

#6 about 2 min

Navigating web worker limitations and data serialization constraints

Web workers lack direct interface access and require deep copying for large data transfers between threads.

#7 about 2 min

Leveraging offscreen canvas to render graphics in background threads

Transferring canvas control directly to a worker avoids serialization overhead for complex graphical rendering.

#8 about 2 min

Managing external third-party scripts using the Partytown library

Proxying standard web functionality allows non-critical analytics tools to run entirely outside the main runtime.

#9 about 1 min

Calculating virtual DOM state with worker-centric frontend frameworks

Experimental architectures attempt to calculate all interface modifications and backend logic via dedicated workers exclusively.

#10 about 2 min

Weighing web worker communication overhead against baseline performance gains

Optimizing existing single-threaded logic is essential before accepting the architectural complexity of cross-thread messaging.

Matching moments

1:36 min

Offloading WebAssembly execution to background web workers

Paweł Aniszewski Paweł Aniszewski · Europe 2026 Virtual

2:35 min

Why single-threaded JavaScript needs an event loop

Christian Woerz · LIVE

1:33 min

Offloading tracking tasks from the main thread to web workers

Chris Ferdinandi · JS Congress

2:27 min

Understanding service worker threads and event-driven architecture

Rowdy Rabouw Rowdy Rabouw · World Congress 2023

2:15 min

Transitioning native desktop graphics implementations to the web

Chris Heilmann Chris Heilmann +3 · LIVE

1:26 min

Managing the single-threaded Node.js event loop

Rob Richardson · JS Congress