I'm curious why this is used instead of simply using setTimeout? IS_SCROLLING_DEBOUNCE_INTERVAL is after all 150 ms and thus any reduced inaccuracy from setTimeout should not be relevant?
Is there something here I'm missing? Like is the scheduling priority important?
We are noticing some performance issues with requestAnimationFrame and notice that react-window does a lot of calls with that.
The root for this is:
Which use a rather peculiar
requestTimeout
which is based on polling requestAnimationFrame:I'm curious why this is used instead of simply using
setTimeout
?IS_SCROLLING_DEBOUNCE_INTERVAL
is after all 150 ms and thus any reduced inaccuracy fromsetTimeout
should not be relevant?Is there something here I'm missing? Like is the scheduling priority important?