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

Try to reduce dl impact on slow computers (web) #1513

Merged
merged 2 commits into from Sep 28, 2018

Conversation

@Chocobozzz
Copy link
Contributor

Chocobozzz commented Sep 21, 2018

On slow computers with a fast network, web browsers may no longer respond because webtorrent is downloading chunks too fast.

The main issue is that you cannot stream a video torrent: the web browser does not have time to play the video, it is too busy downloading the video chunks.

On web browser supporting requestIdleCallback, we download chunks with a lower priority allowing the web browser to execute other tasks (like playing the video).

On slow computers with a fast network, web browsers may no longer respond because webtorrent is downloading chunks too fast.

The main issue is that you cannot stream a torrent video: the web browser does not have time to play the video, it is too busy downloading the video chunks.

On web browser supporting [requestIdleCallback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback#See_also), we download chunks with a lower priority allowing the web browser to execute other tasks (like playing the video).
Copy link
Member

DiegoRBaquero left a comment

I like this. LGTM

@DiegoRBaquero DiegoRBaquero merged commit e9b209c into webtorrent:master Sep 28, 2018
3 checks passed
3 checks passed
WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Chocobozzz added a commit to Chocobozzz/PeerTube that referenced this pull request Oct 1, 2018
webtorrent client dependency
@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.