Practical Guide To Not Blocking The Event Loop
August 1, 2024
JavaScript runs in a single-threaded environment with an event loop, an architecture that is very easy to reason about. It’s a continuous loop executing incoming work. Said work can schedule more of it for the future.
Source: Practical Guide To Not Blocking The Event Loop :: Building Better Software Slower
As a single threaded language JavaScript has a simplicity in most use cases that’s a strength. But sometimes we need to compute things that take a long time and that simplicity becomes a weakness–since long running processes block not just other JavaScript but the main UI thread of the browser.
Here Slava Knyazev considers what we can do about that. Pairs nicely with Nishu Goel’s Breaking Up Long Tasks from Summit 2023.