There Are a Lot of Ways to Break Up Long Tasks in JavaScript
Due to how browsers and the event loop work, letting a single task hog the main thread is a quick way to freeze up your site’s UI. Alex explains the problem and uses a simple example to walk through the pros and cons of different solutions from basic use of setTimeout() to requestAnimationFrame(), channel messaging, and Web Workers. - https://macarthur.me/posts/long-tasks/
#javascript
Due to how browsers and the event loop work, letting a single task hog the main thread is a quick way to freeze up your site’s UI. Alex explains the problem and uses a simple example to walk through the pros and cons of different solutions from basic use of setTimeout() to requestAnimationFrame(), channel messaging, and Web Workers. - https://macarthur.me/posts/long-tasks/
#javascript
Alex MacArthur
There are a lot of ways to break up long tasks in JavaScript.
It's very common to intentionally break up long, expensive tasks over multiple ticks of the event loop. But there are sure are a lot of approaches to choose from. Let's explore them.
👍2❤1
Deeply Understand Currying in 7 Minutes - https://www.yazeedb.com/posts/deeply-understand-currying-in-7-minutes
#javascript
#javascript
👍1