Extremly slow perfomance while expanding grouped field with many results.
First of all... Thank you for this excellent component! i found it very useful!
Bug report: When expanding a grouped field, that contains many results, total rows count of the table only considers the first level of agrupation. So when you try to expand this first level, the totaly of the results are rendered at once. In my case I have "categories" containing over 5k rows each, so when i try to expand it, it takes more than 30 seconds to render the data.
I tried with 7000 rows of data, 4 columns, zero actions on each row, and defining grouping: true as the only Option for the MaterialTable Component. Im using built-in data handling, not the remote data functionality.
To Reproduce Steps to reproduce the behavior:
- Set: data={this.props.dataArray}, options={{ grouping:true }}
- Drag and drop column header in order to group by.
- Expand one of the grouped values.
- When there is a significant amount of results it takes to long to render the rows, doesn't responds normally (the cursor gets buggy and no response browser warning is showned).
Expected behavior It would be great to have the pagination on the amount of expanded rows, and not only on the first level of aggrupation.
Desktop (please complete the following information):
- OS: Ubuntu 18.4
- Browser [Chrome]
- Version [75.0.3770 64bits]
Thx!
@NicoEspositoARG I think that the root of the issues comes from our API. We are paying the cost of React abstraction. Basically, having an intermediary component for each table elements has a cost. Compare with 100 rows:
- https://material-ui.com/performance/table-raw/

- https://material-ui.com/performance/table-component/

- https://material-ui.com/performance/table-mui/

An alternative would be:
import React from 'react';
import { Table } from '@material-ui/core';
// ...
<Table>
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
but we would lose style capabilities at the cell level. Can React handle 28k cells in the first place? If not, then virtualization is our best option.
Hi @oliviertassinari maybe I wasn't clear in my original post, but i think the issue here is that the pagination doesn't work over the amount of expanded rows, it only takes to account the first level of aggrupation.
For example in the screenshot below, notice that the pagination is based in 2 items (rows) corresponding to the results of the first level of grouping ("state"). The results shown when expanding one of this levels are not been counted to the pagination logic. Even the amount of rows rendered does not correspond to the limit established per page.

Without grouping the pagination works as expected:

HI, I have the same problem!
This is happening to me too, any workaround?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
Any chance we can get an alternative to this issue? Thx
+1
Let's my previous post about virtualization (as a way of performance improvement) where I share some sample code: https://github.com/mbrn/material-table/issues/891#issuecomment-681986647
+1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
the issue is still there...