-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perf #45
Comments
That would be amazing @bjoerge, currently I am debouncing but still, I am seeing performance drops. |
PR submitted: #47 |
What if use
react-sentinel as example |
Any tips to have a 60fps framerate when scrolling? |
what about to start using |
In my experience testing this, using transform was actually slower. |
@clauderic thanks! I'm just curious, in your perf test, did you use
and change only |
For anyone who may stumble on it: this will cause any |
Hi @clauderic, thanks for this library!
I'm having a few performance issues which seem to be caused by
onScroll
triggering a setState which triggers a re-render. Here's a capture of scrolling through a list with arenderItem
that only render simple<span>Hi</span>
-items:For reference, this is using the dev build of React 15.6.1, with 6x CPU slowdown.
This can be improved by adding the scroll listener as a passive event listener instead of using
onScroll
(AFAIK React does not support specifying events as passive usingon*
-props, so it must be set up incomponentDidMount
).Additionally, to increase performance even more the
VirtualList
component could support adebounce
-prop, which takes a number of milliseconds to debounce thehandleScroll
method with.Would you be interested in a PR for this?
The text was updated successfully, but these errors were encountered: