silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
161 stars 17 forks source link

Avoid loading data for matrix/heatmap view when selecting a large 2D dataset #1651

Open t20100 opened 1 month ago

t20100 commented 1 month ago

Is your feature request related to a problem?

When opening a large 2D dataset containing many curves (shape: 1e6 x 3000, dtype: float32), it takes a huge amount of time to load for the matrix view or heatmap view... while one want to browse the curves with the Line view.

Requested solution or feature

It would be nice to avoid loading the whole dataset when it is too large and not needed. A button to confirm loading the matrix/heatmap view when data is obviously too big would allow to switch to the Line view without waiting for the dataset to be loaded.

Alternatives you've considered

Use a threshold of the image size to select the default view for 2D datasets: heatmap or line if too large.

Additional context

Related to #1650

loichuder commented 1 month ago

https://github.com/silx-kit/h5web/issues/1053 could give a sensible metric for deciding to avoid loading the data