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

Chunked loader to reduce memory ceiling #43

Open
FL33TW00D opened this issue Nov 2, 2023 · 2 comments
Open

Chunked loader to reduce memory ceiling #43

FL33TW00D opened this issue Nov 2, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@FL33TW00D
Copy link
Owner

FL33TW00D commented Nov 2, 2023

Your peak memory usage when using WASM is your memory usage for the rest of time, see WebAssembly/design#1397

This means we need to load from IndexedDB in chunks, to reduce peak memory consumption.

@FL33TW00D FL33TW00D converted this from a draft issue Nov 2, 2023
@FL33TW00D FL33TW00D added the bug Something isn't working label Nov 2, 2023
@jozefchutka
Copy link

Not sure what exactly are the memory issues you face, but when working with large files in browser, Blob-s are very helpful.

To my experience, even when using dozen of GBs of data referenced via Blob, there are no memory peaks observed.

The downside of using Blobs are that:

  1. access to the bytes is async
  2. the data are readonly, unless you decide to slice the source Blob to create another Blob object (which is a synchronous operation).

I wonder if Blobs are suitable for your case.

@FL33TW00D
Copy link
Owner Author

Not sure what exactly are the memory issues you face, but when working with large files in browser, Blob-s are very helpful.

To my experience, even when using dozen of GBs of data referenced via Blob, there are no memory peaks observed.

The downside of using Blobs are that:

  1. access to the bytes is async
  2. the data are readonly, unless you decide to slice the source Blob to create another Blob object (which is a synchronous operation).

I wonder if Blobs are suitable for your case.

I need to look into this! I'll take a look at Blobs thanks for the reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants