Multithreading in Javascript: A guide to Web Workers
Stop letting heavy computations freeze your UI. Learn how Web Workers unlock true parallelism in JavaScript, keeping your application responsive and running at 60 FPS.
#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
06:30 MIN
Q&A on web workers and native browser components
The Lean Web
01:45 MIN
Demo code and using web workers for performance
Privacy-first in-browser Generative AI web apps: offline-ready, future-proof, standards-based
09:15 MIN
Q&A: Arrow functions and Node.js multithreading
JavaScript the Grumpy Parts
13:10 MIN
Audience Q&A on practical micro-frontend challenges
Micro-frontends anti-patterns
02:21 MIN
Understanding why JavaScript needs an event loop
The Eventloop in JavaScript - How does it work?
07:15 MIN
Strategies for optimizing Interaction to Next Paint
What you need to know about Core Web Vitals
02:46 MIN
Debunking the myth of single-threaded Node.js
Node.js: More Threads Than You Think
01:57 MIN
The two primary approaches for improving frontend performance
To New Frontiers: The Future of Frontend Development
The Concept of Concurrency & Multithreading: What Are They And How They FunctionAs the world around us moves ever more online, the need for software engineers is growing - seemingly by the hour. Whether by building firewalls that fend off the next big data breach, or developing the next app that goes viral, we have a seemingly i...
Chris Heilmann
Micro Components - a different approach to a simpler component-based webThere has been a lot of heated discussion lately in the web community about component based development. One side argued that Web Components are a standard we should follow whereas others complained that they still lag behind in what frameworks offer...
Chris Heilmann
Processing 175 WeAreDeveloper World Congress talk videos in 5 hours - with PHP?Every year after the WeAreDevelopers World Congress is over, we have a ton of video footage to edit and release. Most of it is in raw format and needs editing by hand, but a lot of our sessions are also streamed live on YouTube and thus easier to re-...
Chris Heilmann
Accessibility tip: Detecting reduced motion in one line of JavaScriptAnimation can be a great tool to make apps seem more performant, be more engaging or even just more interesting. There are, however, quite a few groups of people who can not deal with things animating, as it distracts them or can even cause nausea. T...
From learning to earning
Jobs that call for the skills explored in this talk.