bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.72k stars 782 forks source link

Outwards order for expensive cells? #645

Closed Izhaki closed 3 weeks ago

Izhaki commented 2 years ago

The order of the columns is left to right, and rows top to bottom.

We are using the virtualiser to render audio waveforms and their overview takes time to calculate. What's more, this will eventually happen in web workers, meaning asynchronously.

For example, each column will 1000px wide. At zoom 1/32 you have 32000 samples to iterate on, per column. With an overscan of 1, this gives nearly 100K samples on initial render.

It makes more sense in these scenarios to first render the column that is actually seen, only then do the overscan ones.

In fact, I think this makes sense for all cases.