[data grid] Updating rows has a performance bottleneck (MissingRowIdError + try/catch) #15615
Labels
component: data grid
This is the name of the generic UI component, not the React module!
enhancement
This is not a bug, nor a new feature
performance
Steps to reproduce
Steps:
My result – 25% of all scripting time is spent on try/catch handling:
Current behavior
Cells and rows lose their state when rows are updated, but while the olds rows are still mounted.
Expected behavior
Ideally rows and cells should retain their state even through the whole rendering cycle.
However, I completely understand if that's difficult to fix.
The good enough alternative is to avoid throwing any errors and return null instead. Try/Catch logic has too much overhead in these hot code paths.
Context
We use setRows extensively, since we handle filtering outside of the Datagrid component. Setting rows on each keystroke when searching could benefit from an improved performance.
For fast changing grids, it would also reduce the need for row update throttling quite a bit.
Your environment
npx @mui/envinfo
Search keywords: MissingRowIdError
The text was updated successfully, but these errors were encountered: