HN 精选

Jake Archibald on the web browser event loop, setTimeout, micro tasks, requestAnimationFrame, ...

JSConf
7 人推荐 · 跨 6 个月 · 2018–2023
Web 开发软件性能与系统优化
Jake Archibald on the web browser event loop, setTimeout, micro tasks, requestAnimationFrame, ...

中文导读

Jake Archibald 在 JSConf.Asia 2018 上的神级演讲《In the Loop》,用生动的可视化动图彻底拆解了浏览器 Event Loop,涵盖 tasks、microtasks、requestAnimationFrame 以及渲染机制与 JS 执行的交错关系,讲透了各种代码执行时序怪象和滥用 setTimeout 的坑。

为什么 HN 推它

HN 社区公认的浏览器事件循环最佳入门与进阶指南,风趣幽默且直观易懂,能瞬间理清困扰前端工程师多年的时序玄学。

「竟然能把这么抽象的东西讲得既风趣又让人一眼看懂!」HN 网友原话:actually making it both entertaining and easily grokable!
英文原摘要(HackerTube / Claude 整理)

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.

HN treats it as the best primer on the event loop, praising its entertaining, easy-to-grasp visual explanations.

HN 上的提及

rec mxschumacher · 2018-07 · HN 原文
Here are two great talks to help you
strong_rec wattengard · 2018-10 · HN 原文
actually making it both entertaining and easily grokable!
strong_rec olavgg · 2018-10 · HN 原文
Awesome video for every javascript developer.
reference memco · 2019-05 · HN 原文
Just rewatched this talk on Monday
strong_rec phist_mcgee · 2020-11 · HN 原文
The best primer for the event loop I have found is here

相关视频