Surma avatar Surma

When should you be using Web Workers?

Screenshot of “When should you be using Web Workers?”

Surma explains very well how “low-end phones will mostly likely be used by the massive number of people coming online in the next couple of years“, and why we need to take that into account when we design our frontend Web architectures.

Considering that most players on my game esviji are (I should say "were", as most have deserted now… 😥) from emerging markets:

3 years of esviji players around the world thanks mostly to #FirefoxOS devices.
+@MozillaPH @Mozilla_BRA @mozillamx

Image from Tweet

I guess I should follow Surma's advice for the next iteration of the game (a full rewrite has been planned months ago already… 😅):

Web Workers help your app run on a wider range of devices. Libraries like Comlink help you utilize workers without losing convenience and development velocity. I think we should question why every platform but the web is fighting for the UI thread to be as free as possible. We need to shift our default approach and help shape the next generation of frameworks.


  1. screenshot of Why We're Breaking Up with CSS-in-JS

    Sam Magura

    Why We're Breaking Up with CSS-in-JS

    Thanks for reading this deep dive into runtime CSS-in-JS. Like any technology, it has its pros and cons. Ultimately, it's up to you as a developer to evaluate these pros and cons and then make an informed decision about whether the technology is right for your use case. For us at Spot, the runtime performance cost of Emotion far outweighed the DX benefits, especially when you consider that the alternative of Sass Modules + utility classes still has a good DX while providing vastly superior performance.

  2. screenshot of Speeding Up Async Snippets

    Harry Roberts avatar Harry Roberts

    Speeding Up Async Snippets

    For all the resulting script is asynchronous, the <script> block that creates it is fully synchronous, which means that the discovery of the script is governed by any and all synchronous work that happens before it, whether that’s other synchronous JS, HTML, or even CSS. Effectively, we’ve hidden the file from the browser until the very last moment, which means we’re completely failing to take advantage of one of the browser’s most elegant internals… the Preload Scanner.

  3. screenshot of Hydration is Pure Overhead

    Miško Hevery avatar Miško Hevery

    Hydration is Pure Overhead

    The re-execution of code on the client that the server already executed as part of SSR/SSG is what makes hydration pure overhead: that is, a duplication of work by the client that the server already did. The framework could have avoided the cost by transferring information from the server to the client, but instead, it threw the information away.