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.
Featured Partners
Related Videos
Node.js: More Threads Than You Think
Matteo Collina
The Eventloop in JavaScript - How does it work?
Christian Woerz
Uncharted Territories of Web Performance - Andrew Burnett-Thompson and David Burleigh
Andrew Burnett-Thompson & David Burleigh
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
From learning to earning
Jobs that call for the skills explored in this talk.


Front-End UI Designer - JavaScript, HTML, CSS, Three.js, Data Visualisation, Remote
Nova Source Technologies Limited
Remote
API
CSS
HTML
WebGL
+5
Frontend Developer | Workforce Management
Haystack People
The Hague, Netherlands
Scrum
React
Vue.js
Angular
JavaScript
+1
Software Engineer (Node JS)
The Workshop
Municipality of Madrid, Spain
Intermediate
REST
MySQL
NoSQL
Redis
Kafka
+13
Frontend Webentwickler (m/w/d) - Javascript Frontend Webentwickler (m/w/d) - Javascript
Per Zukunft GmbH & Co. KG
Berlin, Germany
€47-57K
CSS
jQuery
JavaScript
Backbone.js


