Skip to content

Instantly share code, notes, and snippets.

@tmkasun
Created May 5, 2021 06:19
Embed
What would you like to do?
Demo - Effect of blocking the main event loop in JavaScript
  • Open the Link
  • Open the Developer console
  • And type
setInterval(() => {var a = Date.now(); while(Date.now() - a < 1000);},3000)
  • Open the performace monitor in the browser
  • And you will see the below CPU usage pattern image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment