Company
Date Published
Author
Cormac Flynn
Word count
1506
Language
English
Hacker News points
1

Summary

The new query and render scheduler was initially developed to optimize performance on dashboards but was later generalized for use on any expensive task or fetch-heavy application. The original scheduler had a complex set of heuristics governing its behavior, which made it difficult for developers to reason about how a dashboard updated and rendered its content. A simpler algorithm was eventually arrived at, with only 6 parameters governing its behavior, and this new algorithm performed better than the old one in terms of task distribution. The render scheduler was also improved using the Browser Scheduling API, which allows for prioritized tasks that are natively scheduled by the browser. This resulted in faster widget renders and fewer long tasks, leading to a faster and more responsive UI.