Closed ronag closed 9 months ago
Can you tell me a little bit more?
If you use isTimeToYield()
the overhead of queueing the await yieldOrContinue()
for the next microtask disappears. Will that work for you?
Yea, that does improve things a bit.
Awesome! With isTimeToYield()
, yieldControl()
is called at most once per frame. However, if you experience an overhead while testing please let me know. Thanks!
if (isTimeToYield('user-visible')) {
await yieldControl('user-visible')
}
The performance overhead of the current Promise based API is not non-trivial. Any chance to get a callback API as well?