Skip to content

Add range-based partial fetch for h5wasm provider #1264

@bmaranville

Description

@bmaranville

Is your feature request related to a problem?

Reading very large files with the h5wasm provider is not possible, for several reasons:

  1. maximum size of ArrayBuffer and also "file" in emscripten is often < about 2GB
  2. maximum size of memory in the browser is a limitiation for in-memory file representation
  3. unreasonable demands on network/infrastructure to download entire huge files.

Requested solution or feature

For web file servers with HDF5/NeXus files that support range requests, on-demand loading could enable access to very large NeXus files that would be infeasible to read as a whole, using emscripten's lazyFile functionality

Alternatives you've considered

HSDS and grove providers already allow this type of random access to parts of a NeXus file.

Additional context

Because sync file access is required, this might require refactoring the h5wasm provider to operate from a worker.
Note that it could potentially be refactored to a service worker that uses the same API as a grove server, if that simplifies things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions