Making Sense of Event Loops…or Not

In this edition of my adventures in codeLand, I watched Philip Roberts presentation on JavaScript and what is the event loop. I have watched this video about 3 times. There are a few points that make sense, and putting all the points together as a whole is still a blurry of understanding.

  1. call stacks : a structure that know where you are in a program and also a guide that keeps the stack organize by pushing in request and popping off the top of the stack when it gets a return
  2. goal: fluid ui : )
  3. bad: blocking the stack make loading slow : (
  4. synchronous: seem to process slower due to blockage in queue, hence you see the spinning wheel and nothing happen when you click on the page until a few moments later
  5. asynchronous: there pauses processing queues, there is no blocking of the stack, things are still getting done but slowly — seem to be more preferred
  6. Don’t block the event loop.

I hope that as I go further along the yellow brick road of coding that I would understand these talks and apply the concepts they are talking about.

Ta Ta for now.

Thuy