Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Refresh tab does not release memory #13273

Closed
inear opened this issue Feb 23, 2018 · 8 comments
Closed

Refresh tab does not release memory #13273

inear opened this issue Feb 23, 2018 · 8 comments

Comments

@inear
Copy link

inear commented Feb 23, 2018

I have been following an issue in chromium in the current version of Chrome (M64) that have problems with refreshing tabs on pages that use WebAudio. V8 keeps references to older contexts because of a memory leak. The same problem can be seen in Brave. It's not happening in M65 so it should be fine here as well once it's reaches Brave. (I have novice understanding about open source and release-cycles etc) Just want to mention it here because it can possible be the cause of some of the "sluggish performance" issues.

Steps to Reproduce

Go to a page, preferable a html5 game or 3d page using WebAudio. Inspect performance monitor or profile JS heap and see memory footprint continue to increase. Change domain and memory is released.

Actual result:
Memory keeps increasing for every refresh.

Expected result:
Memory should be released.

Brave Version

Brave: 0.20.42
V8: 6.4.388.41
rev: 096c7cb
Muon: 4.8.2
OS Release: 16.6.0
Update Channel: Release
OS Architecture: x64
OS Platform: macOS
Node.js: 7.9.0
Brave Sync: v1.4.2
libchromiumcontent: 64.0.3282.140

Reproducible on current live release:
Yes

Additional Information

https://bugs.chromium.org/p/chromium/issues/detail?id=810701#c29

@btlechowski btlechowski added bug 0.20.x issue first seen in 0.20.x cr64 labels Feb 24, 2018
@btlechowski
Copy link
Contributor

Confirmed 0.20.42

Thank you for reporting the issue. Indeed Brave will update Chromium to 65. We will keep the issue open till the new Chromium is integrated.

@btlechowski btlechowski added this to the 0.21.x (Beta Channel - CR 65) milestone Feb 24, 2018
@hferreiro
Copy link
Contributor

I have just verified that Brave on C65 does not have this issue by trying to reproduce the steps in https://bugs.chromium.org/p/chromium/issues/detail?id=810701#c11

@bsclifton
Copy link
Member

Great, thanks @hferreiro! I'll close this issue. Can you share steps you tried? When I follow the link you shared, it mentions the Chrome Task Manager. How did you verify the memory? (just viewing Activity Monitor or something like this?)

@srirambv
Copy link
Collaborator

I can't make out any change in resource utilization using the resource monitor on Windows when I visit http://luminance.org/stuff/810701/audio-leak.html and follow the steps mentioned in the original chromium bug. @hferreiro Any specific steps to be performed on Windows to verify this?

@hferreiro
Copy link
Contributor

@bsclifton I tested on Linux and used Gnome System Monitor. Any tool that shows memory usage by process should be ok, I guess.

@LaurenWags
Copy link
Member

Reload of the page didn't really seem to do anything but Clean Reload freed memory (went from about 214.x MB to 171.x MB), is this sufficient @bsclifton @hferreiro ? cc @kjozwiak

@btlechowski
Copy link
Contributor

btlechowski commented Mar 16, 2018

The reload button does free the memory after couple of seconds and F5 frees instantly. One of the processes grew to 90MB, then shrank after reload(F5) back to 20MB.

Verified on Win7 v0.21.19.

Steps followed:

  1. Launch Browser
  2. Open task manager
  3. Navigate to http://luminance.org/stuff/810701/audio-leak.html
  4. Click on issue an xhr, then click decode, then click play (Do the same for x times) - grew around 20MB for every iteration.
  5. Refresh the page

@LaurenWags
Copy link
Member

LaurenWags commented Mar 16, 2018

Steps used for testing on MacOS:

  1. Launch Brave.
  2. Open Activity Monitor
  3. Navigate to http://luminance.org/stuff/810701/audio-leak.html
  4. Click on issue an xhr, then click decode, then click play (Do the same for x times - you will see a Brave Helper grow in memory, I did this until it was approximately 300 MB)
  5. Refresh the page
  6. Wait a few seconds, memory for that Brave Helper will go down.

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

7 participants