silx-kit / h5web

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

Improve fetching for large datasets #616

Open loichuder opened 3 years ago

loichuder commented 3 years ago

Having played around with large datasets (~10M of points but a slice is ~100k), I find that the long fetch of the data breaks the flow...

Let's make use of this issue to gather possible improvements:

axelboc commented 3 years ago

I'd add that, when performing long downloads and computations, the UI should:

loichuder commented 3 years ago

Our discussion on https://github.com/silx-kit/h5web/pull/632 also gave me an idea: we could make the flattening operation more consistent by encapsulating in the get/useValue method.

Edit: This was done in #661

It then becomes relevant to this issue as it would be a stepping stone to request the flattening on the back-end. Thus, avoiding another expensive computation in h5web.

axelboc commented 3 years ago

In the providers' getValue() methods? Yeah, totally 👍

axelboc commented 3 years ago

635 implements cancellation on the front-end, but it doesn't resolve crashes on Bosquet when attempting to fetch (and cancel the fetch of) extremely large datasets.

axelboc commented 3 years ago

640 implements retrying after cancelling (including evicting cancellation errors from the value store's cache).

jreadey commented 3 years ago

Just curious - for HSDS, have you tried using HTTP Compression? That should reduce the payload size considerably.

loichuder commented 3 years ago

Unfortunately, the impact will be limited as most of our heavy datasets are not compatible with HSDS due to https://github.com/HDFGroup/hsds/issues/76 :confused:

But this is something that we still need to try !

axelboc commented 3 years ago

Binary is now used with H5Grove when getting dataset values: #817

loichuder commented 2 years ago

The auto-scale-off feature in the LineVis that forces us to fetch the whole dataset can be a real limiter for huge datasets (https://github.com/silx-kit/jupyterlab-h5web/issues/71).

Maybe, it is time to review it ? We could

loichuder commented 2 years ago

The auto-scale-off feature in the LineVis that forces us to fetch the whole dataset can be a real limiter for huge datasets (silx-kit/jupyterlab-h5web#71).

877 implemented an intemediate solution:

headtr1ck commented 1 year ago

It seems that h5wasm now (as of v0.4.8) supports lazy loading of arrays. Is that beneficial for this issue as well (or in general for loading files >2GB)? Not really familiar with the interal workings though, so excuse me if this has nothing to do with this :)

For reference, see this discussion: https://github.com/usnistgov/h5wasm/issues/40

loichuder commented 1 year ago

Sure, that's relevant also for large datasets.

For h5wasm, we have a more specific issue tracking this at https://github.com/silx-kit/h5web/issues/1264

domna commented 1 year ago

Is it also planned to have streaming binary support for hsds? I could also try to implement it myself in the hsds api but I'm not a typescript expert, so I could use some guidance.

I experienced problems with this while I was experimenting with storing and loading large datasets via hsds and I use h5web in a simple hsds directory browser to view the stored data. However, the hsds server gets stuck on large datasets because h5web requests the data in json format.

loichuder commented 1 year ago

Is it also planned to have streaming binary support for hsds? I could also try to implement it myself in the hsds api but I'm not a typescript expert, so I could use some guidance.

To be honest, we don't really plan to improve the HSDS part since we mostly use h5grove and h5wasm. But you are welcome to contribute and we will be happy to help you doing so.

If you have some working code, feel free to open a draft PR to discuss. If something blocks you, you can drop us a line at h5web@esrf.fr.