Rob Dodson - Home

Chrome/Blink devs discuss setImmediate

— 1 minute read
It looks like you've found one of my older posts 😅 It's possible that some of the information may be out of date (or just plain wrong!) If you've still found the post helpful, but feel like it could use some improvement, let me know on Twitter.

Really interesting discussion of the pros and cons of the setImmediate function. For a little backstory checkout this post by Nicholas Zakas (@slicknet)

Here's a nice tidbit from one of the Chrome devs:

To perform work immediately before the next display - for example to batch up graphical updates as data is streamed in off the network - just make a one-off requestAnimationFrame() call. To perform work immediately -after- a display, just call setTimeout() from inside the requestAnimationFrame() handler.

The full thread is available here.

Filed under: