Dani Coll
Multithreading in Javascript: A guide to Web Workers
#1about 2 minutes
Why front-end performance matters for business success
Poor application performance leads to user churn and reduced revenue, highlighting the need to understand JavaScript's single-threaded nature.
#2about 1 minute
How the JavaScript engine executes functions
The call stack is a last-in, first-out (LIFO) data structure that the JavaScript engine uses to track function execution.
#3about 5 minutes
Demystifying asynchronous execution with the event loop
Asynchronous operations like promises and timers are managed by the event loop, which prioritizes the microtask queue over the macrotask queue.
#4about 2 minutes
Moving from concurrency to true parallelism
Web Workers enable true parallelism by running scripts on a background thread, communicating with the main thread via the postMessage API.
#5about 6 minutes
Preventing UI freezes with a Web Worker demo
A live demo shows how running a CPU-intensive chess move calculation in a Web Worker keeps the main thread responsive and the UI smooth.
#6about 3 minutes
Understanding Web Worker limitations and solutions
Web Workers cannot access the DOM and incur overhead from data serialization, but the OffscreenCanvas API allows direct canvas manipulation from a worker.
#7about 2 minutes
Leveraging libraries and frameworks for Web Workers
Libraries like Partytown can run third-party scripts in a worker, while frameworks like Neo.js are built entirely around the Web Worker paradigm.
#8about 1 minute
Final advice on using Web Workers effectively
Web Workers are a powerful tool for specific performance bottlenecks but should be considered only after optimizing the main thread code first.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
32:31 MIN
Q&A on web workers and native browser components
The Lean Web
1:07:33 MIN
Q&A: Arrow functions and Node.js multithreading
JavaScript the Grumpy Parts
33:55 MIN
Audience Q&A on practical micro-frontend challenges
Micro-frontends anti-patterns
43:12 MIN
Strategies for optimizing Interaction to Next Paint
What you need to know about Core Web Vitals
00:37 MIN
The web is slow and fragile because of JavaScript
The Lean Web
35:03 MIN
Q&A on performance, architecture, and PWA capabilities
Interactive server side components
24:30 MIN
Demonstrating Wasm speed with the Finicky Whiskers game
The Future of Cloud is WebAssembly
14:36 MIN
Achieving fast loads with a dual-threaded architecture
Lynx: Native for More
Featured Partners
Related Videos
Node.js: More Threads Than You Think
Matteo Collina
Uncharted Territories of Web Performance - Andrew Burnett-Thompson and David Burleigh
Andrew Burnett-Thompson & David Burleigh
The Eventloop in JavaScript - How does it work?
Christian Woerz
The Lean Web
Chris Ferdinandi
Things I learned while writing high-performance JavaScript applications
Michele Riva
Catching up on the basics you don't really need that much code
Chris Heilmann
The Journey of a Pixel in a React Application
Shem Magnezi
The Naked Web Developer: Your Browser Is Your Framework
Avichay Eyal
From learning to earning
Jobs that call for the skills explored in this talk.
![Senior Software Engineer [TypeScript] (Prisma Postgres)](https://wearedevelopers.imgix.net/company/283ba9dbbab3649de02b9b49e6284fd9/cover/oKWz2s90Z218LE8pFthP.png?w=400&ar=3.55&fit=crop&crop=entropy&auto=compress,format)
Senior Software Engineer [TypeScript] (Prisma Postgres)
Prisma
Remote
Senior
Node.js
TypeScript
PostgreSQL

Lead Full-Stack Engineer
Hubert Burda Media
München, Germany
€80-95K
Intermediate
Senior
React
Vue.js
Node.js
MongoDB
+1

Principal Backend Engineer (Node.js)
Almedia
Berlin, Germany
€80-110K
Senior
NestJS
Node.js
Express
TypeScript
+1



Backend Engineer - TypeScript / Performance / Home Office
Jobflow GmbH
Remote
TypeScript
Microsoft Office


