Closed Bug 1722694 Opened 3 years ago Closed 3 years ago

Memory leak at refresh of Youtube pages (non-video)

Categories

(Core :: Performance, defect, P2)

Firefox 91
defect

Tracking

()

RESOLVED DUPLICATE of bug 1717553
Performance Impact medium

People

(Reporter: dreadhead90, Unassigned)

Details

(Keywords: perf:resource-use)

Attachments

(2 files)

Attached file start-memory-report.json.gz (deleted) —

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

Starting Firefox with all addons (exept HTTPS everywhere) disabled and load up one tab with the youtube start page and one tab with my youtube subscriptions. Keep these tabs open during the day and reload them throughout the day.
For the attached memory reports I "simulated" the daily usage by repeatedly refreshing the tabs during a shorter time spread.

Actual results:

The web containers holding these tabs increase significantly in memory. At the end of the test, Firefox uses around 2 GB more memory than at the start.

Expected results:

Since the only actions taken between the measurements are refreshing of the tabs, I don't think that the memory consumption should increase. Or at least not to this extent.

Attached file final-memory-report.json.gz (deleted) —

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Component: Audio/Video: Playback → DOM: Core & HTML
Component: DOM: Core & HTML → Performance

Thanks for reporting this problem! In about:config, can you please try setting accessibility.force_disabled to 1 and see if they resolves the issue?

Flags: needinfo?(dreadhead90)

(In reply to Denis Palmeiro [:denispal] from comment #3)

Thanks for reporting this problem! In about:config, can you please try setting accessibility.force_disabled to 1 and see if they resolves the issue?

I made the change and tried a similar test as in my original post again. Unfortunately it didn't help and I still have the memory leak upon multiple refresh.

Flags: needinfo?(dreadhead90)

i am dealing with the same exact issue, i have tested in Firefox nightly and stable with accessibility.force_disabled being set 1.

clicking on minimize memory from about:memory page didn't free the excessive memory usage.

to replicate all you need is to keep reloading a youtube page.

dthayer was able to reproduce this by reloading the youtube page repeatedly. The about:memory dump shows most of the memory under js-realm(https://www.youtube.com/feed/subscriptions) and dom.

Jon, do you know how to proceed here?

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jcoppeard)
OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Whiteboard: [qf:p2:resource]

I can reproduce this by loading two tabs containing youtube homepage and subscriptions page, and alternately reloading them.

Using the devtools memory shapshot doesn't show any memory increase (it stays at roughly 100MB).

Memory usage reported by about:memory increases each time, even after using 'minimize memory usage'. E.g.:

1,425.92 MB (100.0%) -- explicit
├──1,066.94 MB (74.82%) -- window-objects
│ ├──1,031.18 MB (72.32%) -- top(https://www.youtube.com/feed/subscriptions, id=137)
│ │ ├────939.79 MB (65.91%) -- active/window(https://www.youtube.com/feed/subscriptions)

It seems we are keeping the realm for the subscription page alive somehow:

40 (100.0%) -- js-main-runtime-realms
├──36 (90.00%) -- user
│ ├──21 (52.50%) ── https://www.youtube.com/feed/subscriptions [21]

This should have been fixed by the patch for bug 1717553. Can you confirm this works as expected in latest nightly?

Flags: needinfo?(jcoppeard) → needinfo?(dreadhead90)

(In reply to Jon Coppeard (:jonco) from comment #8)

This should have been fixed by the patch for bug 1717553. Can you confirm this works as expected in latest nightly?

i can confirm that it's fixed, thanks c:

(In reply to Jon Coppeard (:jonco) from comment #8)

This should have been fixed by the patch for bug 1717553. Can you confirm this works as expected in latest nightly?

Yes, I also tried to recreate my original experiment after downloading nightly, and it seems that the leak has been fixed!
Thanks to everyone who helped in this matter.

Flags: needinfo?(dreadhead90)

(In reply to ryn.and0 from comment #9)
Great, thanks both for confirming.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Performance Impact: --- → P2
Whiteboard: [qf:p2:resource]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: