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

Sluggish scrolling when rendering table with large dataset in React #11686

Closed
spacejamtda opened this issue Nov 28, 2017 · 6 comments
Closed

Comments

@spacejamtda
Copy link

So I'm creating an application with real-time streaming data in a table using react (v16.1.1). The number of rows shown at a time can be rather large (400+ rows) and when those situations occur, the scrolling behavior on browsers (desktop & mobile) really takes a hit and staggers when attempting to browse the content. Has anybody experienced this kind of scrolling behavior when rendering large data sets in a table?

I'm expecting React to be able to efficiently draw/redraw these elements with ease but that doesn't appear to be the case. I tried using JSFiddle to recreate the scenario but did not have much success.

@gaearon
Copy link
Collaborator

gaearon commented Nov 28, 2017

@spacejamtda
Copy link
Author

Hey @gaearon, yeah I checked out those resources. React-Virtualized unfortunately doesn't meet my front-end needs/use-cases so I went with my own custom table component. I coupled my table solution with react-lazyload (https://github.com/jasonslyvia/react-lazyload) to get a similar react-virtualized effect but it still doesn't seem to efficiently render.

@gaearon
Copy link
Collaborator

gaearon commented Nov 28, 2017

Can you provide a reduced test case that shows the problem?

@quantizor
Copy link
Contributor

@spacejamtda more than likely, your root issue is trying to inject and modify too many DOM elements at once. Your best bet is to implement an element recycling strategy that only renders the content in view.

@gaearon
Copy link
Collaborator

gaearon commented Dec 8, 2017

I'll close because there isn't enough information here to help.

@gaearon gaearon closed this as completed Dec 8, 2017
@ArunRapolu
Copy link

How to display a List of arrays with react-virtualized in a Table.

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

No branches or pull requests

4 participants