-
Notifications
You must be signed in to change notification settings - Fork 48
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
Browser memory usage #89
Comments
This is a really good find @ylt, we will dig into it and see what the best fix is. Thanks for the clear debugging steps 🙏🏼 |
@ylt echoing @dylanjha thanks for the sleuthing. Confirmed this is currently an issue. I'll be investigating possible solutions here, where we'll want to make sure we're striking a good balance between performance/time to upload w/memory efficiency. I'll be sure to update here on any direction we end up taking. |
@cjpillsbury - any has there been any update on this? |
We had some problems trying to upload some large files (+10GB) because we could only store up to 2GB inside the node Buffer.
Hope it helps while UpChunk don't handle the stream directly; |
@digitalscream None yet unfortunately. Our team is split across multiple projects, so this may be a few weeks out still before we can work on it in due diligence. |
If anyone on this thread wants to take a stab at migrating upchunk to use read streams, PRs are always welcome! |
Hey all! I know this has been a long time coming, but we've got a refactor of upchunk to use |
@cjpillsbury - thanks for that...I'll keep an eye out! |
Been finding that when uploading large files (i.e. 6gb), the browsers RAM usage increases to include the filesize. This can exceed the users RAM and end up with the users browsers tab crashing or their computer crashing.
Looking at this myself, I've been able to reproduce it on both Firefox (102) and Chrome (103) on both Windows and Mac M1.
Firefox's dev tools are able to identify a bunch of ArrayBuffers that take up as much RAM as the filesize, but is unable to attribute it to a js call stack(maybe browser internals). Chrome dev tools however are unable to see the memory at all.
Googling, I'm not finding much authoritive, but it does seem like file.slice as done by Upchunk can be problematic.
upchunk/src/upchunk.ts
Line 220 in 1ba86a9
The text was updated successfully, but these errors were encountered: