~/talk

Let Your Browser Take a Breather with a Scheduler.yield()

Talkat Conf42 JavaScript 2025 · on Thursday, 2025-10-30· [web-platform, javascript]
slides:none on file

Claim: scheduler.yield() from the prioritized task scheduling API pauses long JavaScript chunks and resumes them as a prioritized microtask so UI events run first, avoiding setTimeout’s unpredictable delays. Demo shows 200 items × 10ms = a 2s freeze without yielding; using yield keeps buttons responsive and logs process in real time. A simulated banking app with 1,000 × 10ms also freezes until yield is enabled (5% interval), after which the interface stays usable. Polyfill exists; browser support is experimental.

AI-written summary · about

  1. 0:00Introduction and Speaker Background
  2. 1:11Understanding Scheduler Yield
  3. 2:00JavaScript Task Processing Basics
  4. 2:42The Problem with Long Tasks
  5. 5:37Simulating Heavy Computation
  6. 7:55Demonstrating the Problem
  7. 11:32Exploring Solutions
  8. 15:56Introducing Scheduler Yield
  9. 18:26Prioritized Task Scheduling API
  10. 21:49Practical Demo: Banking Application
  11. 27:00Conclusion and Final Thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.