Tagged articles
5 articles
Page 1 of 1
JavaScript
JavaScript
Nov 29, 2025 · Frontend Development

Why setTimeout Falls Short and How requestIdleCallback Keeps Your UI Smooth

The article explains how the browser’s single‑threaded nature makes long JavaScript tasks block rendering, outlines the timing issues of setTimeout, introduces requestAnimationFrame for visual sync, and shows how requestIdleCallback can safely schedule low‑priority work during idle periods.

Browser APIsJavaScriptrequestAnimationFrame
0 likes · 4 min read
Why setTimeout Falls Short and How requestIdleCallback Keeps Your UI Smooth
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 22, 2022 · Frontend Development

React Scheduler: Implementing Idle‑Time Execution and Time Slicing with requestAnimationFrame, postMessage and MessageChannel

This article explains how React simulates requestIdleCallback by combining requestAnimationFrame, postMessage, and MessageChannel to execute work during browser idle periods, detailing the evolution from the early rAF‑postMessage approach in v16 to the message‑loop implementation in v18 and providing simplified source code examples.

MessageChannelReactTime Slicing
0 likes · 14 min read
React Scheduler: Implementing Idle‑Time Execution and Time Slicing with requestAnimationFrame, postMessage and MessageChannel
Alibaba Terminal Technology
Alibaba Terminal Technology
Aug 5, 2021 · Frontend Development

How VS Code Achieves Sub‑Second Startup: Secrets from CovalenceConf 2019

This article summarizes the key techniques presented at CovalenceConf 2019 for optimizing Visual Studio Code's startup performance, covering measurement, bundling, V8 code caching, lifecycle phase ordering, requestIdleCallback, and perceived‑performance tricks that together reduce launch time to under one second.

ElectronPerformance OptimizationStartup Performance
0 likes · 13 min read
How VS Code Achieves Sub‑Second Startup: Secrets from CovalenceConf 2019