romannerez-giraffesoftware opened a new issue, #35981:
URL: https://github.com/apache/superset/issues/35981
### Bug description
### Problem
When using the Pivot Table visualization in Apache Superset with large
datasets (e.g. 20k+ rows × 10 columns),
the browser freezes or becomes unresponsive.
This seems to be caused by the fact that the table renders all DOM elements
at once (no virtualization / windowing).
### Steps to reproduce
1. Create a Pivot Table with a dataset larger than ~20,000 rows
2. Open the chart in Explore view or in a dashboard
3. Observe the browser lag, high CPU usage, and slow page response
### Expected behavior
Pivot Table should render only the visible portion of the table, using
virtualization (lazy rendering / windowing)
to support large datasets efficiently.
### Environment
- Apache Superset version: 5.0.0
- Browser: Chrome / Edge / Firefox
- Deployment: Docker / Local dev
### Suggested solution
Integrate a library like `react-window` or `react-virtualized` into the
Pivot Table plugin.
Example pseudocode:
```js
import { FixedSizeList as List } from 'react-window';
<List height={600} itemCount={rows.length} itemSize={35}>
{({ index, style }) => (
<div style={style}>{renderRow(rows[index])}</div>
)}
</List>
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [ ] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]