Some weeks ago @Cadienvan made his own implementation of signals, capable of updating 300k times the DOM in circa 600ms. Michael shared how the #MicrotaskQueue works and how you can leverage the Event Loop to improve performances.
portal.gitnation.org/contents/lever…
#MicrotaskQueue
Microtasks, like Promises and process.nextTick, have their own queue. They have higher priority and get executed before the callback queue.
Some weeks ago, @Cadienvan, Full-Stack Dev, created a signal system updating the #DOM 300k times in about 600ms.
Using the #MicrotaskQueue⏱️, Michael slashed it to 6ms, effectively improving performances by 100x. Join to learn how it optimizes DOM updates through the Event Loop.
Day 48 of #100DaysOfCode learned from #JSTheHardParts about the microtask queue. The most common scenario is promises .then() handler executes and enqueues the #microtaskqueue. Why does it matter? Because it affects the order of execution - microtasks go before macrotasks