-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data grid] Improve vertical scrolling performance #11924
Conversation
Deploy preview: https://deploy-preview-11924--material-ui-x.netlify.app/ |
fc3b776
to
e2c7bda
Compare
Follow-up of #10059 (comment)
I've inspected a bit the "recalculate styles" phase, it's triggered by the But this seems fairly logical to me: because the rows that are removed are the first childs of their container (these tests were all scrolling down), the browser invalidates the layout of all the siblings that come after. In other words, all the rows are invalidated because they all come after the first rows, which are removed. I'll try to figure if we can find a way to have the browser avoid redoing the style/layout for all those elements. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
1 similar comment
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
0aafd3b
to
1eb2f6d
Compare
{ | ||
"key": "cellOffsetLeft", | ||
"className": "MuiDataGridPremium-cellOffsetLeft", | ||
"description": "Styles applied to the left offset cell element.", | ||
"isGlobal": false | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to @ignore - Do not document
this one but it didn't work. How can I do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it does not impact the classes.
I'll submit a PR to the core repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, a nice step forward 👍. From what I can benchmark, this makes us not too far from where we were before #10059. I see a reduction of about 100ms spent in "Rendering", for every 1,000ms of rendering. |
I was curious, since this change, when we enable we see the whole grid container light up 💡: Screen.Recording.2024-02-11.at.20.42.50.movOptions:
|
Co-authored-by: Andrew Cherniavskyi <andrew@mui.com>
Follow-up of #10059 (comment)
One iteration on #11866
Improve the vertical scrolling performance. This PR removes the
transform: translate(...)
style on cellsand use an offset filler cell instead. It fixes a rendering bottleneck with the "Layerize" rendering step:
Preview: https://deploy-preview-11924--material-ui-x.netlify.app/x/react-data-grid/#pro-plan