1. React
  2. Midwest JS
  3. 2019
  4. Parallel Process in JS

Parallel Process in JS

Joe Karlsson at Midwest JS 2019

For a long time, JavaScript was missing any kind of processing threads. While the single-threaded model added to developer comfort, it also made the platform unable to do serious and time-consuming calculations, and the only way to circumvent it was to do it on a remote server. Luckily, with the introduction and widespread adoption of Web Workers, we can now do resource-intensive calculations on background threads. A Web Worker allows you to run JavaScript in the background, without affecting the performance of the page. Even if you are running really resource intense code in the browser, you can continue to do whatever you want: clicking, selecting things, etc., while the Web Worker runs in the background. In this talk, we will explore: * Web Workers, how and when you can use them, and their peculiarities. * Perf and framerate benefits (with data!) * Polyfilling for naughty browsers * Future: WebGL, Canvas2D, and other marvels browser vendors are cooking up.