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

Better large file handling #3

Closed
feross opened this issue Sep 11, 2014 · 11 comments
Closed

Better large file handling #3

feross opened this issue Sep 11, 2014 · 11 comments

Comments

@feross
Copy link
Member

feross commented Sep 11, 2014

Large files fail with RangeError (in Chrome)

@spikebike
Copy link

Define large? Just tried a 600MB ISO with no problem. It does seem to assume that all UDP ports are open to the internet, it seems to try a random port each time.

@feross
Copy link
Member Author

feross commented Sep 18, 2014

I made some changes and this is no longer an issue! I'd still like performance to be better, but this issue can be closed!

@feross feross closed this as completed Sep 18, 2014
@feross
Copy link
Member Author

feross commented Sep 18, 2014

Actually, this is still broken. I get an error when actually trying to download the file. Something like "Error: No File" (in chrome). However, the data is being transferred, so it's an error creating the final blob and url. Will investigate soon.

@feross feross reopened this Sep 18, 2014
@FesterCluck
Copy link

@feross
Copy link
Member Author

feross commented Oct 6, 2014

@FesterCluck thanks will check it out

@feross feross changed the title Large files fail with RangeError (in Chrome) Better large file handling Jan 5, 2015
@feross
Copy link
Member Author

feross commented Jan 5, 2015

Haven't seen RangeError in a while, but large downloads seem to stall part-way through (around when the tab hits 2GB ram?)

@FesterCluck
Copy link

You should check to see if you are hitting your machine's paging limit.

@feross
Copy link
Member Author

feross commented May 10, 2015

For a 105MB file, the page uses 540MB of memory. By commenting out bits of the code at a time, I found this breakdown:

  • 90MB just for loading instant.io in chrome (incl. my browser extensions)
  • 210MB from drag-drop/buffer
  • 105MB from create-torrent in webtorrent.seed
  • 105MB from file.getBlobURL in onTorrent on instant.io

Checked off = fixed.

We're creating lots of buffers that don't get released, it seems. Ideally, we only need to hang onto one copy of the buffer.

@feross
Copy link
Member Author

feross commented May 17, 2015

There are still some leaks, but it doesn't look like we're losing any full copies of the file anymore! Progress! There's only one copy of the file in memory.

For a 360MB file:

  • 90 MB for base instant.io page
  • 360 MB for file
  • 160 MB for webtorrent.seed (and leaks?)

cc @jhiesey

@feross
Copy link
Member Author

feross commented May 17, 2015

We're now running into a bug in Chrome where blobs can't be larger than 500MB. https://code.google.com/p/chromium/issues/detail?id=375297 This looks like it's really close to being fixed though! Right now, this means you can't seed a file larger than 500MB from Chrome.

I was able to seed a 1GB file in Firefox and stream to Chrome!

@feross
Copy link
Member Author

feross commented May 17, 2015

_This issue was moved to webtorrent/webtorrent#319._

@feross feross closed this as completed May 17, 2015
@webtorrent webtorrent locked and limited conversation to collaborators May 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants