Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve fetching for large datasets #616

Open
2 of 4 tasks
loichuder opened this issue Apr 20, 2021 · 14 comments
Open
2 of 4 tasks

Improve fetching for large datasets #616

loichuder opened this issue Apr 20, 2021 · 14 comments
Labels
epic Issue that will need to be split up later on

Comments

@loichuder
Copy link
Member

loichuder commented Apr 20, 2021

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:

@loichuder loichuder added the epic Issue that will need to be split up later on label Apr 20, 2021
@axelboc
Copy link
Contributor

axelboc commented Apr 26, 2021

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

  • be more informative (i.e. progress status, subsampling rate, etc.)
  • remain responsive and allow cancelling slow computations (i.e. not just requests)

@loichuder
Copy link
Member Author

loichuder commented Apr 28, 2021

Our discussion on #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
Copy link
Contributor

axelboc commented Apr 28, 2021

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

@axelboc
Copy link
Contributor

axelboc commented Apr 28, 2021

#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
Copy link
Contributor

axelboc commented Apr 29, 2021

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

@jreadey
Copy link

jreadey commented May 30, 2021

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

@loichuder
Copy link
Member Author

Unfortunately, the impact will be limited as most of our heavy datasets are not compatible with HSDS due to HDFGroup/hsds#76 😕

But this is something that we still need to try !

@axelboc
Copy link
Contributor

axelboc commented Oct 26, 2021

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

@loichuder
Copy link
Member Author

loichuder commented Nov 9, 2021

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).

Maybe, it is time to review it ? We could

  • Disable it somehow for huge datasets. And give an indication to the user ?
  • Request the domain separately (as proposed originally in Improve fetching for large datasets #616 (comment)) to avoid the need to compute it in the front-end (and therefore the need to have the full dataset values)

@loichuder
Copy link
Member Author

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:

  • When the auto-scale is on, only the relevant slice is fetched
  • Auto-scale is no longer persisted and is activated by default. That means that, by default, only slices are fetched.
  • Turning the auto-scale off fetches the full dataset. For now, it is up to the user to not trigger this for huge datasets.

@headtr1ck
Copy link

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: usnistgov/h5wasm#40

@loichuder
Copy link
Member Author

Sure, that's relevant also for large datasets.

For h5wasm, we have a more specific issue tracking this at #1264

@domna
Copy link

domna commented Mar 7, 2023

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
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Issue that will need to be split up later on
Projects
None yet
Development

No branches or pull requests

5 participants