Jake Archibald on the web browser event loop, setTimeout, micro tasks, requestAnimationFrame, ...
Channel:JSConf · Length:35:12 · Published:2018-02-09 · Views:808930
Summary
Jake Archibald's JSConf.Asia 2018 talk "In the Loop" explains the browser event loop, covering tasks, microtasks, requestAnimationFrame, and how rendering interleaves with JavaScript. It uses visual walkthroughs to show why code runs in surprising orders and why setTimeout fixes are unreliable.
Why HN recommends it
HN treats it as the best primer on the event loop, praising its entertaining, easy-to-grasp visual explanations.
actually making it both entertaining and easily grokable! — HN, 2018
Web development · Software performance & optimization
Subtitles (excerpt)
Hello everyone! How's it going? Let me see if I can get my slide clicker out. Yeah, this is my first time in Singapore. Yeah, it's nice. This is already going well. If I get an applause for that. That's fantastic. I haven't really looked around yet, like I landed just before the conference, so I can't say I've really experienced it yet, but I'm going to stay on for a few days afterwards, and have a proper explore. I brought my partner along with me as well and I have to say that was a big mistake, a huge mistake, because she's been really looking forward to this trip, and especially over the last couple of weeks she's been saying things like, two weeks till we go to Singapore, one week till we go to Singapore, five days to go, four days to go, and I am like, could you please not do that because what I'm hearing is five days, you only have five days to finish your talk. Four days, three days, you're still not ready, are you? She's like the worst project manager ever just taunting me on how unprepared I am, but then – she's brilliant because she knows how to put up with me because I stress. I stress pretty easily. I stress about things that aren't really problems. I stress about things that have really nothing to do with me.
On Hacker News
The best primer for the event loop I have found is here: [VIDEO] The speaker (Jake Archibald) has that rare ability to be both likeable and relatable, while also being incredibly knowledgeable and enthusiastic. I wish a lot more talks were like this! — phist_mcgee, 2020-11
Jake Archibald talking about the javascript event loop and actually making it both entertaining and easily grokable! [VIDEO] — wattengard, 2018-10
Jake Archibald's "In the Loop", Visual explanation of how the javascript event loop works! Awesome video for every javascript developer. [VIDEO] — olavgg, 2018-10
> It basically flickers between tasks very rapidly to simulate concurrency. That’s usually used a description of preemptive multitasking, like what you get running a modern OS on a single core (on multiple cores it’s also this but on each core). Every once in a small while, the current task is made to inhale chloroform, another task is chosen to wake and takes its place. Pro: you can’t hang any g… — mananaysiempre, 2023-10
Coming from C and having used thread and being totally ignorant to javascript, this article really helped me grasp async in js by clearing away implicit misconceptions I held : [LINK] And also that talk on the event loop : [VIDEO] — cassepipe, 2023-07
Related videos
- What the heck is the event loop anyway? | Philip Roberts | JSConf EU · JSConf · 26:52
- Jordan Peterson | ContraPoints · ContraPoints · 28:19
- Voting Machines: Last Week Tonight with John Oliver (HBO) · LastWeekTonight · 19:22
- Your Brain Thinks Your Whole Home Is One Room · CGP Grey · 10:58
- Jancovici : Will technology save us from Climate Change ? MIT Media Lab - 23/02/2021 · Jean-Marc Jancovici · 1:49:32
- Build Your Own Async · David Beazley · 2:12:41
- But what is the Fourier Transform? A visual introduction. · 3Blue1Brown · 19:41
- Who's faster around London: a taxi driver or a GPS? · Tom Scott plus · 25:09
- How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework · Видео с мероприятий {speach! · 49:55
- Rich Harris - Rethinking reactivity · You Gotta Love Frontend · 36:45
- CppCon 2015: Andrei Alexandrescu “std::allocator...” · CppCon · 1:12:27
- Preventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc) · DevGAMM · 1:02:41
- "Performance Matters" by Emery Berger · Strange Loop Conference · 42:15
- Crockford on JavaScript - Volume 1: The Early Years · YUI Library · 1:42:08
- RailsConf 2016 - Turbolinks 5: I Can’t Believe It’s Not Native! by Sam Stephenson · Confreaks · 37:37
- The Thirty Million Line Problem · Molly Rocket · 1:48:55