# When It Makes Sense To "Block" The Main Thread

DevFeed: [When It Makes Sense To "Block" The Main Thread](<https://devfeed.tech/articles/when-it-makes-sense-to-block-the-main-thread-4316.md>)

Original publisher: [Read original article](<https://smashingmagazine.com/2026/07/when-makes-sense-block-main-thread/>)

Author: hello@smashingmagazine.com (Victor Ayomipo)

Published: 2026-07-17T08:00:00Z

Content type: article

Language: en

Sources: [Articles on Smashing Magazine -- For Web Designers And Developers](<https://devfeed.tech/sources/articles-on-smashing-magazine-for-web-designers-and-developers.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Chrome extension](<https://devfeed.tech/topics/chrome-extension.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [modern web development](<https://devfeed.tech/topics/modern-web-development.md>), [Chrome](<https://devfeed.tech/topics/chrome.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [browser](<https://devfeed.tech/tags/browser.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [chrome-extension](<https://devfeed.tech/tags/chrome-extension.md>), [coding](<https://devfeed.tech/tags/coding.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [latency](<https://devfeed.tech/tags/latency.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [performance](<https://devfeed.tech/tags/performance.md>), [techniques](<https://devfeed.tech/tags/techniques.md>), [thread](<https://devfeed.tech/tags/thread.md>)

## AI overview

This article examines when blocking the browser's main thread can be faster than transferring work to a background worker. Using a Chrome screenshot extension as an example, it explains how serialization, copying, and deserialization can introduce enough latency to outweigh the responsiveness benefits of offloading computation.

## Source excerpt

The common rule of thumb is to never "block" the browser's main thread when running JavaScript tasks. But is this a hard rule? Victor Ayomipo describes a use case he encountered involving a screenshot extension where he made an exception to the rule and decided that blocking the main thread was absolutely the right thing to do.