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
28:28 MIN
Demo code and using web workers for performance
Privacy-first in-browser Generative AI web apps: offline-ready, future-proof, standards-based
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
06:27 MIN
Understanding why JavaScript needs an event loop
The Eventloop in JavaScript - How does it work?
43:12 MIN
Strategies for optimizing Interaction to Next Paint
What you need to know about Core Web Vitals
00:05 MIN
Debunking the myth of single-threaded Node.js
Node.js: More Threads Than You Think
03:58 MIN
The two primary approaches for improving frontend performance
To New Frontiers: The Future of Frontend Development
Featured Partners
Related Videos
Node.js: More Threads Than You Think
Matteo Collina
The Eventloop in JavaScript - How does it work?
Christian Woerz
Catching up on the basics you don't really need that much code
Chris Heilmann
Things I learned while writing high-performance JavaScript applications
Michele Riva
The Lean Web
Chris Ferdinandi
The Journey of a Pixel in a React Application
Shem Magnezi
The Naked Web Developer: Your Browser Is Your Framework
Avichay Eyal
Qwik: Making sure that easy is same as performant
Miško Hevery
Related Articles
View all articles.gif?w=240&auto=compress,format)



From learning to earning
Jobs that call for the skills explored in this talk.




Backend Engineer (TypeScript - Cloudflare Workers, TimescaleDB & AI Infrastructure)
nono
€75-120K
Intermediate
Node.js
Grafana
GraphQL
Terraform
+7

Backend Engineer (TypeScript - Cloudflare Workers, TimescaleDB )
nono
€75-120K
Intermediate
Node.js
Grafana
GraphQL
Terraform
+7



Full Stack Engineer
Multiverse Computing
