When It Makes Sense To “Block” The Main Thread
tech
Smashing Magazine questions a cornerstone of web development: the rule that you must never block the main thread. But according to the article, sometimes the overhead of moving work to a background worker—serializing data, transferring it, deserializing it—can actually freeze the UI worse than just doing the work upfront. The author discovered this while building a Chrome extension called Fastary for screenshots, which experienced a consistent two to three second lag even with the recommended background-processing architecture. The real principle, the piece argues, isn't 'never block the main thread' but rather 'never block it for too long.' Transferable objects can bypass the serialization overhead, but they come with their own technical limitations.
Source: https://smashingmagazine.com/2026/07/when-makes-sense-blo...
Listen to this story
Hear this and more stories in a personalized audio briefing.
Open The Chonkerton