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

Allow increasing 2GB file limit. #49

Open
DeanTM opened this issue Oct 9, 2024 · 3 comments
Open

Allow increasing 2GB file limit. #49

DeanTM opened this issue Oct 9, 2024 · 3 comments

Comments

@DeanTM
Copy link

DeanTM commented Oct 9, 2024

Is your feature request related to a problem?

I'm working with some large files, usually > 1TB, but the viewer is limited to files smaller than 2GB. If the file is greater than 2GB I need to open it through a different interface.

This is a problem because I'm working remotely and the second interface searches for files on my local computer. My workarounds are to:

  • either mount the remote data storage on my local computer;
  • or use the H5Web viewer with Jupyter Lab.

Neither option is convenient, but because H5Web works with larger files in Jupyter Lab, I assume it's not an H5Web problem but rather a VSCode extension limitation.

Requested solution or feature

Allow users to increase the 2GB limit in the workspace or user settings (if this is already the case, where is the setting?)

Alternatives you've considered

Additional context

@axelboc
Copy link
Contributor

axelboc commented Oct 9, 2024

Indeed, it's due to the fact that the extension runs in a sandboxed webview. The only way I found for the webview to receive a JavaScript File object (to avoid the 2GB limit) is if the user initiates an interaction (file picker or drag-and-drop) from inside the webview via an <input type="file"> element. If there's another way, I'm not aware of it.

When the user selects a file in the sidebar, VS Code exposes this file to the webview through a URI. H5Web then fetches its entire content with an HTTP request, which is where the 2 GB buffer size limit comes in.

A solution might be to implement a provider in H5Web that can perform HTTP range requests in order to fetch only the parts of the file that are needed. There's an issue for this in H5Web: silx-kit/h5web#1264. Of course, this first assumes that VS Code can respond to HTTP range requests.

@andygotz
Copy link

Question by a non-expert: does this mean if H5Web implemented a file selection box and loaded the file itself i.e. not through VSCode, it would be able to go beyond the 2GB limit? If this is not too difficult to implement it could provide a work-around for desktop users. Just a thought!

@axelboc
Copy link
Contributor

axelboc commented Oct 14, 2024

This is already the case:

image

Unfortunately, this is not sufficient for @DeanTM due to the remote use case:

If the file is greater than 2GB I need to open it through a different interface. This is a problem because I'm working remotely and the second interface searches for files on my local computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants