reactScrollbar icon indicating copy to clipboard operation
reactScrollbar copied to clipboard

Debounce and throttle event handlers

Open evoyy opened this issue 8 years ago • 2 comments

This should help improve performance. I don't mind if you accept or not, but I like to use it in my fork.

evoyy avatar Nov 20 '15 02:11 evoyy

I need to think about this change because I've never used debounce nor throttle. Is it really improves scrollbar performance?

souhe avatar Nov 20 '15 21:11 souhe

Well instead of updating the state at every tick it triggers the change event only a defined number of ms, so it could be better performance-wise but could be less fluid I guess, it is worth a test in my opinion.

ingro avatar Nov 20 '15 22:11 ingro