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

Grid and MultiGrid makes 2 render passes on simple scroll #1035

Closed
pete-moss opened this issue Mar 4, 2018 · 5 comments
Closed

Grid and MultiGrid makes 2 render passes on simple scroll #1035

pete-moss opened this issue Mar 4, 2018 · 5 comments

Comments

@pete-moss
Copy link

I am using both Grid and MultiGrid and I am noticing that 2 render passes are made when doing a simple scroll by either clicking on the arrow caret in the scrollbar, or by calling Grid.scrollToCell({rowIndex: n}). Doesn't seem right, and since I already see fairly significant delays when scrolling with MultGrid (the rendering of the row/column header Grids lag behind), I am wondering this could be addressed.

@aem
Copy link
Contributor

aem commented Mar 28, 2018

Hi Pete. Can you please provide us with a code example that demonstrates the scrolling delays you're seeing and a verification of the second render pass?

@wuweiweiwu
Copy link
Contributor

The latency will probably be solved once I finish migrating Grid #1053.

The double render is only observed for Grid when the component initially mounts and also on scroll end.

For Multigrid you will see a "double" render because at any time, you are scrolling two grids either horizontally or vertically.

@pete-moss
Copy link
Author

pete-moss commented Mar 29, 2018

I hope I have done this right (first time trying to use codesandbox - sorry for being such a newbie), but here is a link that illustrates what I meant.
https://codesandbox.io/s/3rz2q0m415
If you open the demo in a browser window and look at the console log, I am tracing each time we are rendering body cell (4, 0). If you do a simple scroll down, or single Arrow Down, I see 2 calls to render that cell. That implies that 2 render passes are being made. Does that make sense?

Regarding delays I see, it mostly occurs when I am using variable-height cells with CellMeasurer. I can certainly understand the performance issues since you have to render all cells in a row to determine row height. But I am poking since if there really is an issue with making 2 render passes, maybe if this could be solved, performance may improve.

@wuweiweiwu
Copy link
Contributor

I'll have to double check. This should be in Grid. So I'm going to hold off until the rewrite is done. Which should be in the next week or so

@HtmlRanger
Copy link

Hi! Any progress on this issue?

@github-actions github-actions bot added the Stale label Oct 13, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2024
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