silx-kit / h5web

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

Revert "Reduce delay when slicing with h5wasm through viewer config" #1657

Closed axelboc closed 1 month ago

axelboc commented 1 month ago

Hmm on second thoughts...

I was looking at #1572 and more specifically at the Autoscale feature of the Line visualization. This feature is designed to control how the domain of the line visualization is computed: when toggled on, the domain is computed from the current slice only; when toggled off, the domain is computed from the entire dataset.

Turns out in terms of data fetching, it is very similar to the prefetch button solution I tried in #1635: the difference is that when toggled off, it triggers a fetch/read of the entire dataset and not just one dimension. This actually simplifies a lot of things, since fetching the entire dataset triggers the suspense fallback (which means that the fetch can be cancelled if need be), and we don't have to rely on react-suspense-fetch to know whether to disable debouncing: we can just use the Autoscale state.

So what I'm saying is that before settling on the viewerConfig.slicingTiming approach, I'd like to try a "pre-fetch button" approach again like in #1635, but designed to work more like the Autoscale toggle.

As added benefits, it would allow disabling debouncing for h5grove as well, and would help us rethink that Autoscale feature to address #1572, which was always a bit confusing.