Event loop
The browser event loop coordinates tasks, microtasks, and rendering opportunities. Long-running JavaScript can delay user input and painting.
What it is
The browser event loop coordinates tasks, microtasks, and rendering opportunities. Long-running JavaScript can delay user input and painting.
Why it matters
A page may have received the click but still feel frozen while a computation occupies its main thread.
Example
A self-perpetuating chain of microtasks can delay rendering even though each callback is short.
Technical detail
Promise reactions run as microtasks; timers queue tasks. Neither provides a hard real-time scheduling guarantee.
When to use it
Break up expensive work or move it to a worker. Measure interaction delay alongside raw computation speed.
Sources
More in Web platform
Assembled from the ReLU.chat curated knowledge base. These explanations are concise on purpose; check the sources for anything important.