WEB WORKERS made my code over 100x faster (almost ZERO blocking time)

Channel:
Subscribers:
81,900
Published on ● Video Link: https://www.youtube.com/watch?v=sMa6d1dXJ-0



Duration: 0:00
19,936 views
910


My game dev channel:

Web workers provide a way to get some sort of multi threading capabilities in JavaScript. They have limitations, but in the right circumstances they can lead to huge performance improvements. In this video, I show how I offload a ton of heavy computations to a worker thread to decrease a large amount of blocking time to almost zero.

More on "wave function collapse" algorithm:    • This is coolest algorithm I've ever u...  

Get weekly content and tips exclusive to my newsletter: https://mobirony.ck.page/4a331b9076

My game dev channel:

MY GEAR:
Keyboard: https://adm42.dev/?ref=3
Neovim setup: https://github.com/joshuamorony/lazyvim/
Animations: https://motioncanvas.io/

0:00 Introduction
0:19 The problem
1:15 Why web workers
1:58 Setting up a web worker
3:15 Using web workers
3:51 Web workers and DOM access
4:58 The results

#angular #javascript #webworker

More tutorials: https://modernangular.com/




Other Videos By Joshua Morony


2025-02-19What's the point of using Astro... with Angular?
2025-02-12How I navigate files QUICKLY and EFFICIENTLY in my code editor
2025-02-05A "real world" example of a non-trivial Angular component done DECLARATIVELY
2025-01-29How Angular's ngNonBindable solved a huge problem in my project
2025-01-22JavaScript's OTHER most unused primitive... BIGINT
2025-01-15Why does Angular need JavaScript's most unused primitive
2025-01-08This is why PROFILING is critical for high performance JavaScript
2025-01-01THIS is a perfect example of where declarative RxJS goes wrong
2024-12-25Why XState and RxJS are not "too complex"
2024-12-18The most powerful RxJS combo I've ever used (massive performance improvement)
2024-12-11WEB WORKERS made my code over 100x faster (almost ZERO blocking time)
2024-12-04How to deeply understand Angular signals (...or anything)
2024-11-27A little TOO complex for Angular signals? or a viable RxJS alternative?
2024-11-20Angular v19 is out!... and it changed my apps (significantly)
2024-11-13I could remove ALL RxJS in my Angular app, but should I?
2024-11-06Why I'm still using RxJS (not signals) for host binding in Angular
2024-10-30Angular team shows POTENTIAL new component authoring formats
2024-10-23This new Angular primitive might actually be a viable alternative to RxJS
2024-10-16How I code PRODUCTIVELY on my phone (with Neovim)
2024-10-09Lots of small projects? You might be missing out on a MONOREPO
2024-10-02Angular is finally a serious contender for content driven sites (with Analog)