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

Brave Extension high memory usage with WDP enabled #23573

Closed
atuchin-m opened this issue Jun 21, 2022 · 3 comments · Fixed by brave/brave-core#13943
Closed

Brave Extension high memory usage with WDP enabled #23573

atuchin-m opened this issue Jun 21, 2022 · 3 comments · Fixed by brave/brave-core#13943

Comments

@atuchin-m
Copy link
Contributor

atuchin-m commented Jun 21, 2022

Description

A memory leak with enabled WebDiscovery Project in Brave Extension.
Community thread: https://community.brave.com/t/memory-leak-with-no-extensions/405082

Steps to Reproduce (need to be clarified)

  1. Enable Web Discovery project in brave://settings;
  2. Restart the browser;
  3. Open ~10 youtube tabs, scrolls them down;
  4. (Optional) watch videos for some time, navigate on youtube.com inside the tabs;
  5. Check Brave Extension memory usage.

Actual result:

Brave extension memory footprint > 200MB

Expected result:

Brave extension memory footprint < 100MB

Extra details:

  1. No issue without enabled WDP;
  2. Reloading the background page helps for some time => memory allocation is triggered by the background page;
  3. JS memory is ~10-20Mb and most of the memory is taken by DOM elements. For the extension background page use webtools => memory => heap snapshot to inspect it.

image (17)
image (18)
image (19)

@BrendanEich BrendanEich changed the title Brave Extension high memory usage Brave Extension high memory usage with WDP enabled Jun 21, 2022
@rebron rebron added priority/P2 A bad problem. We might uplift this to the next planned release. release-notes/include QA/Yes labels Jun 21, 2022
@brave-builds brave-builds added this to the 1.43.x - Nightly milestone Jul 20, 2022
@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Aug 3, 2022
@stephendonner
Copy link

Verified PASSED using

Brave 1.43.61 Chromium: 104.0.5112.81 (Official Build) beta (x86_64)
Revision 5b7b76419d50f583022568b6764b630f6ddc9208-refs/branch-heads/5112@{#1309}
OS macOS Version 11.6.8 (Build 20G730)

First, reproduced the issue with 1.42.88:

10 YouTube tabs 0 open tabs (after 5+ min)
Screen Shot 2022-08-08 at 12 16 17 PM Screen Shot 2022-08-08 at 12 21 51 PM

Confirmed fixed using 1.43.61.

Steps:

  1. install 1.43.61
  2. launch Brave
  3. open brave://settings/search and toggle Web Discovery Project to On/Enabled
  4. load 10 YouTube tabs with high bitrates
  5. close all tabs (the window), but don't shut down Brave
  6. waited 5-10 minutes

Confirmed memory allocation/use was down from 225 -> 66.1 MB

10 YouTube tabs 0 open tabs (after 5+ min)
Screen Shot 2022-08-08 at 12 30 16 PM Screen Shot 2022-08-08 at 12 36 10 PM

@stephendonner stephendonner added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Aug 8, 2022
@MadhaviSeelam
Copy link

MadhaviSeelam commented Aug 11, 2022

Verification PASSED with

Brave | 1.43.67 Chromium: 104.0.5112.81 (Official Build) beta (64-bit)
-- | --
Revision | 5b7b76419d50f583022568b6764b630f6ddc9208-refs/branch-heads/5112@{#1309}
OS | Windows 11 Version 21H2 (Build 22000.856)

Reproduced with 1.42.88

10 YouTube tabs open 0 open tabs(after 5+ min)
image image

After Fix

Steps:

  1. install 1.43.67
  2. launch Brave
  3. open brave://settings/search and toggle Web Discovery Project to On/Enabled
  4. load 10 YouTube tabs
  5. close all tabs (the window), but don't shut down Brave
  6. waited 8-10 minutes

Confirmed memory footprint was down from 236-->36 MB

Step 3 Step 4 Step 6
image image image

@btlechowski
Copy link

Verification passed on

Brave 1.43.78 Chromium: 104.0.5112.102 (Official Build) beta (64-bit)
Revision 8e5396254975ef939f2ef7d0bd334e48a052b536-refs/branch-heads/5112@{#1478}
OS Ubuntu 18.04 LTS

First, reproduced the issue with 1.42.x:

image

Confirmed fixed using 1.43.x.

image

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

Successfully merging a pull request may close this issue.

8 participants