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

Lazy load WebTorrent component #6342

Closed
bbondy opened this issue Oct 7, 2019 · 1 comment · Fixed by brave/brave-core#3616
Closed

Lazy load WebTorrent component #6342

bbondy opened this issue Oct 7, 2019 · 1 comment · Fixed by brave/brave-core#3616

Comments

@bbondy
Copy link
Member

bbondy commented Oct 7, 2019

Description

Currently the WebTorrent component and its background page is loaded when the browser starts. It could save ~20MB and a process if we use a network throttle to detect .torrent and magnet URLs, and only enable it once one of those 2 things are loaded.

Steps to Reproduce

  1. Fresh profile
  2. Navigate to https://webtorrent.io/free-torrents
  3. Pick a magnet URL
  4. Repeat step 1-3 but with a .torrent file link

Actual result:

Torrent loads, but process exists as soon as you open the browser with a fresh profile.

Expected result:

Torrent still loads correctly, but process only starts once you load a torrent.

Reproduces how often:

Always.

Brave version (brave://version info)

All versions.

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Yes
  • Can you reproduce this issue with the dev channel? Yes
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? n/a
  • Does the issue resolve itself when disabling Brave Rewards? n/a
  • Is the issue reproducible on the latest version of Chrome? No

Miscellaneous Information:

@btlechowski
Copy link

btlechowski commented Oct 14, 2019

Verification passed on

Brave 0.70.112 Chromium: 77.0.3865.90 (Official Build) beta (64-bit)
Revision 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS Ubuntu 18.04 LTS

Reproduced on 0.69.x
image

Verified that Webtorrent extension is not launched on clean profile
image
Verified that Web-torrent extension is lazy loaded when torrent file is opened
image
Verified that the torrent is downloaded
Verified opening downloaded files works
Verified saving downloaded files to disk works
Verified that it is possible to download more than one torrent concurrently
Verified that torrent is blocked in Private Window. Encountered #3098
Verified that torrent is blocked in Tor Window
Verified the above for magnet links

Verified passed with

Brave 0.71.103 Chromium: 78.0.3904.70 (Official Build) beta (64-bit)
Revision edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800}
OS macOS Version 10.13.6 (Build 17G5019)

Reproduced issue with 0.70.121:
0 70 121

Confirmed WebTorrent is not launched on clean profile:
0 71 103

Confirmed that Web-torrent extension is lazy loaded when torrent file is opened:
Screen Shot 2019-10-25 at 3 42 49 PM

Confirmed that the torrent is downloaded
Confirmed opening downloaded files works
Confirmed saving downloaded files to disk works
Confirmed that torrent is blocked in Private Window. Encountered #3098
Confirmed that torrent is blocked in Tor Window
Verified the above for magnet links also

Verification passed on

Brave 0.71.104 Chromium: 78.0.3904.70 (Official Build) beta (64-bit)
Revision edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800}
OS Windows 10 OS Version 1803 (Build 17134.1006)

Reproduced issue with 0.70.121:

image

Confirmed WebTorrent is not launched on clean profile:

image

Confirmed that Web-torrent extension is lazy loaded when torrent file is opened:

image

Confirmed that the torrent is downloaded
Confirmed opening downloaded files works
Confirmed saving downloaded files to disk works
Confirmed that torrent is blocked in Private Window. Encountered #3098
Confirmed that torrent is blocked in Tor Window
Verified the above for magnet links also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment