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

[RFC] Row virtualization overscanning tradeoff #270

Closed
oliviertassinari opened this issue Sep 12, 2020 · 5 comments
Closed

[RFC] Row virtualization overscanning tradeoff #270

oliviertassinari opened this issue Sep 12, 2020 · 5 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! RFC Request For Comments

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 12, 2020

The current logic for over scanning is:

https://github.com/mui-org/material-ui-x/blob/b537d5d01fee06079eedbf3253a159907c9356d4/packages/grid/x-grid-modules/src/hooks/root/useContainerProps.ts#L50-L52

A couple of thoughts:

  1. This seems counter-intuitive, from what I understand, over scanning is about avoiding white flashes. It seems that it should be correlated to the height of the rows and how quickly the end-user is scrolling, I don't see any relation with the height of the viewport.
  2. We might want to provide an option to allow developer to customize the threshold. If we do, we might want to have a limit to the size of the buffer, rendering 10,000 rows can get ugly.

See this presentation for a deeper dive into the topic: https://www.youtube.com/watch?v=t4tuhg7b50I.

@dtassone
Copy link
Member

viewportPageSize is calculated with Height of the grid and row height...

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Sep 14, 2020

So if there are 50 rows visible, it overscan 50 rows. If there are 5 rows visible, it overscan 5 rows. Is my conclusion correct?

@dtassone
Copy link
Member

Yes atm there is a factor 2 because of its design, with the rendering zone...
I wouldn't change this for now as I think we could improve the design of the rendering engine and also achieve more flexibility in the extra rendered rows

@m4theushw
Copy link
Member

m4theushw commented Oct 22, 2021

In the latest beta release it was added the rowsBuffer and columnsBuffer props to control how many extra rows/columns should be rendered. Related to #2673

@oliviertassinari
Copy link
Member Author

OK, this does sounds a lot better than having the overscan based on the height of the data grid viewport.

@oliviertassinari oliviertassinari added the RFC Request For Comments label Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

3 participants