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

WebTorrent extension should be non-persistent #6372

Closed
AndriusA opened this issue Oct 9, 2019 · 1 comment · Fixed by brave/brave-core#3638
Closed

WebTorrent extension should be non-persistent #6372

AndriusA opened this issue Oct 9, 2019 · 1 comment · Fixed by brave/brave-core#3638
Assignees
Labels
feature/webtorrent Label for webtorrent related issues perf priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes release-notes/include

Comments

@AndriusA
Copy link

AndriusA commented Oct 9, 2019

Description

Currently the WebTorrent extension loads when browser starts and remains persistently on, whether or not there are any torrents active. It could save ~20MB and a process if we make the extension non-persistent and subscribe it to a smaller subset of pre-filtered events that wake it up, letting the browser unload it when not in use.

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
  5. Inspect Window > Task Manager for "Extension: Brave WebTorrent" task
  6. Close torrent tabs, inspect Task Manager until "Extension: Brave WebTorrent" task disappears (should be 10-20 seconds)

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. Process disappears after closing all active torrent tabs.

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:

This needs changing which events the extension subscribes to and subsequently the logic/data representation that currently relies on window and tab IDs.

@btlechowski
Copy link

btlechowski commented Nov 22, 2019

Verified passed with

Brave 1.2.8 Chromium: 78.0.3904.108 (Official Build) dev (64-bit)
Revision 4b26898a39ee037623a72fcfb77279fce0e7d648-refs/branch-heads/3904@{#889}
OS Ubuntu 18.04 LTS

Verified STR from the description
Verified Webtorrent extension is not launched on clean profile
Verified Webtorrent extension is launched after opening magnet link
Verified Webtorrent extension is launched after opening torrent link
Verified Webtorrent extension is unloaded when there is no tab using the extension

Logged #7061

Verification passed on

Brave 1.2.10 Chromium: 78.0.3904.108 (Official Build) dev (64-bit)
Revision 4b26898a39ee037623a72fcfb77279fce0e7d648-refs/branch-heads/3904@{#889}
OS Windows 10 OS Version 1803 (Build 17134.1006)
  • Verified STR from the description
  • Verified Webtorrent extension is not launched on a clean profile
  • Verified Webtorrent extension is launched after opening magnet link
  • Verified Webtorrent extension is launched after opening a torrent link
  • Verified Webtorrent extension is unloaded when there is no tab using the extension
  • Encountered Blank page for magnet links on clean install #7061

Verification PASSED on macOS 10.15.1 x64 using the following build:

Brave 1.2.40 Chromium: 79.0.3945.88 (Official Build) (64-bit)
Revision c2a58a36b9411c80829b4b154bfcab97e581f1f3-refs/branch-heads/3945@{#954}
OS macOS Version 10.15.1 (Build 19B88)
  • ensured that Extensions: Brave WebTorrent isn't being launched on a clean profile
  • ensured that Extensions: Brave WebTorrent is launched when clicking on magnet links
  • ensured that Extensions: Brave WebTorrent is launched when clicking on .torrent links
  • ensured that Extensions: Brave WebTorrent isn't being launched when clicking on both .torrent & magnet links when WebTorrent is disabled via brave://settings/extensions
  • ensured that Extensions: Brave WebTorrent is being unloaded when there's no tab using the extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/webtorrent Label for webtorrent related issues perf priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants