-
-
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] Change virtualization implementation #1933
Comments
I also did a benchmark here. My viewport shows 15 columns and 20 rows. In each test I try to scroll from top to bottom in approximately 9 seconds. Using the Performance tab and the snippet from https://stackoverflow.com/a/52466954 I got the following frame rates:
Analysing our performance, we're dropping a lot of frames. By removing calls to I've the impression that we might have something to optimize yet. Even with our current virtualization implementation we should be doing better. |
Started looking into a bit of benchmarking as well. I have yet to fully validate how representative these results are, but so far the numbers seem to be quite consistent. The test opens one of the netlify urls above, waits one second, then scrolls down at a fixed rate for 4 seconds while measuring the framerate. For the benchmarks posted above I get:
Which suggests AG grid even outperforms React Virtualized. As said, It's a naive implementation of a benchmark, I yet have to determine how conclusive these numbers are. Thoughts welcome. edit: Just noticed the AG Grid case renders only 10.000 columns. edit 2: Yeah, there's definitely a few things I'm going to need to sort out in this benchmark. For starters, on my machine puppeteer seems to take 32ms to roundtrip the mouse wheel command to chromium. Secondly, when enabling the devtools FPS meter, I see it settle on exactly 30FPS |
Interestingly, AG Grid does a whole lot worse scrolling horizontally:
|
@Janpot Awesome, https://github.com/Janpot/mui-plus/blob/master/scripts/benchmark.ts is going in the right direction! We have a similar automation approach in the core repository. It's what we need. We should be able to run multiple time the same tests to start to get a good idea of the uncertainty/standard deviation. Then, we can leverage it to know if a change makes a difference or if we don't have enough precision to conclude. This seems very relevant to the benchmark effort that @DanailH started in June. How is the effort going alone? |
The method seems statistically significant, when I calculate the standard deviation for these numbers over 10 runs I get
|
Summary 💡
Based on this benchmark #1903 (comment) there might be a different implementation of the virtualization that could yield better performance. We are currently underperforming compared to popular existing alternatives.
Motivation 🔦
A data grid is meant to make it easy to navigate information, the quality of the UX is heavily impacted by its rendering performance.
Before we commit to a different direction, I think that it's critical we investigate the state of the art with a rigorous benchmark of the existing solution. We can measure the average frame rate when scrolling vertically relatively quickly (relative to the speed of reading/scanning with the yet). My viewport shows 9 columns and 20 rows. So far (to update & complement), we have, sorting by performance:
React Virtualized
MUI+
AG Grid
XGrid
Once we find a solution that seems better and we commit to it, we will also very likely want to take new constraints in:
Benchmark
The text was updated successfully, but these errors were encountered: