A presentation at #PerfMatters by Trent Willis
Does your web app make lots of data requests? Have you ever dealt with large datasets or slow data processing in your app? If so, you’re not alone.
These issues, and others like them, often lead to poor user experiences as our applications frequently show loading spinners, jank, or even freeze completely. These experiences are all too common on the web, but we have a solution: Web Workers.
Web Workers promise to help us build fast, responsive, and robust applications by getting heavy, JavaScript-intensive work off the main thread of the browser. But, the APIs for working with them leave much to be desired. In this talk, we’ll learn useful patterns for working with Web Workers and discover effective ways to communicate between workers, handle complex data processing off the main thread, and test and debug them, so that we can stop getting in our users’ way!
The following resources were mentioned during the presentation or are useful additional information.
A library to turn Web Worker messages into Promises
A library to provide a proxy interface for a Web Worker in the main thread
A library to turn a JavaScript ES Module into a Web Worker
A library to turn a JavaScript ES Module into a Web Worker as an import
A library to turn a Function into a Web Worker
A dashboarding application used by Netflix that heavily uses Web Workers
A library to perform DOM operations in a Web Worker
A library to help test Web Workers by providing an easy way to create, stub, and modify your Workers