-
-
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
[DataGrid] Improve vertical scrolling performance #11866
Comments
This comment was marked as resolved.
This comment was marked as resolved.
@romgrk A quick progress report on my laptop, using this script to scroll expandclass Scroller {
static scroll({ element, distance = 50000, speed = 50, maxSpeed = 1000, acceleration = 0, callback, scrollFn }) {
let scrollTop = 0;
const intervalId = setInterval(() => {
if (scrollFn) {
scrollFn(scrollTop)
} else {
element.scrollTop = scrollTop;
}
scrollTop += speed;
if (speed < maxSpeed) speed += acceleration;
if (scrollTop > distance) {
clearInterval(intervalId);
callback && callback();
}
}, 5);
}
}
Scroller.scroll({ element: document.querySelectorAll('.MuiDataGrid-virtualScroller')[1] }) Before https://deploy-preview-11650--material-ui-x.netlify.app/x/react-data-grid/#pro-plan After #10059 (add position: sticky) https://deploy-preview-10059--material-ui-x.netlify.app/x/react-data-grid/#pro-plan Today on HEAD https://next--material-ui-x.netlify.app/x/react-data-grid/#pro-plan AG Grid https://www.ag-grid.com/example/, scrolling at the same speed and with the same number of column / column type I confirm the regression is pretty much gone, nice job 👍. As for future improvement opportunities, the ones I can see:
Screen.Recording.2024-02-26.at.02.27.30.movI guess positioning each row |
The Sticky headers PR fixed a bunch of issues, improved horizontal scrolling UX, and reduced the gaps when dragging the scroll thumb.
However, the vertical scroll performance has regressed - see #10059 (comment)
We can improve the performance according to #10059 (comment):
Search keywords:
The text was updated successfully, but these errors were encountered: