Skip to content
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

Optimize performance of getVirtualItems #21

Closed
jordaaash opened this issue Aug 25, 2015 · 2 comments
Closed

Optimize performance of getVirtualItems #21

jordaaash opened this issue Aug 25, 2015 · 2 comments

Comments

@jordaaash
Copy link
Contributor

getVirtualState is getting the height of the container every onScroll (in addition to a lot of other repeated calculations) when the values likely haven't changed. I believe this is causing elements to be reflowed by the browser, and even if not, is doing the same work over and over.

I will try to optimize the method after #14 which is required to know if things need to be recalculated.

@jordaaash
Copy link
Contributor Author

Also possibly related: #1, #3

@developerdizzle
Copy link
Owner

Great catch; this should be able to be cached, as long as we recalculate it on componentWillReceiveProps if the container has changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants