Event Loops are Your Friend
I have never heard of Event Loops before this video. That makes sense since I’m just starting out in code, but I imagine that ELs are a black box to even intermediate coders, because you don’t really have to know how they do what they do to take advantage of their functionality, but it certainly helps!
Instead of working in a straight call stack, one task after another, you can ease up lag time between time-consuming functions by exploiting run timers, and pushing those tasks out of the stack and on to the webapi, where they will be count down until they are pushed to the EL. Here, they will wait until the stack is cleared, then they will be run.
Following this analogy, functions and calls that require a wait time should be earmarked with run time, and pushed into a queue so that less arduous tasks can be addressed in the meantime while they process.
I’ve yet to utilize run time in any real world situations, but I can see conceptually how it will make things much more efficient for both the coder and the user.