Closed Bug 1649053 Opened 4 years ago Closed 4 years ago

Memory increases after refreshing with DevTools open

Categories

(DevTools :: General, defect)

77 Branch
defect

Tracking

(firefox78 affected, firefox79 affected, firefox80 affected)

RESOLVED DUPLICATE of bug 1682212
Tracking Status
firefox78 --- affected
firefox79 --- affected
firefox80 --- affected

People

(Reporter: lerro_m, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(4 files)

Attached file memory-report.json.gz (deleted) β€”

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

Refreshing a page will increase the memory it consumes, and will never seem to go down. It will even increase after you pass the browser.sessionhistory.max_entries about:config limit, and the browser.sessionstore.max_serialize_back limit (so probably not a problem with history or the back button memory storage?).

E.g. load a webpage. Keep refreshing that page (e.g. 20 times). Memory will go up and never go back down, even after going into about:memory and doing a "Minimize memory usage"

If you go to about:memory and do a measure, and open up the tree at the most memory consuming of the items, and keep expanding until you get to the (in my case) strings list, it seems to be storing a copy of every string / JS file for every reload of the page.

In my case the session max_entries and max_serialize_back are both default (50 and 10, respectively), and the count of the JS strings stored is 106, after doing 106 refreshes (I'm a developer and refresh the same page after making changes to it).

Recorded 29/June/2020, using Firefox 77.0.1, running Windows 10 64bit version 1909, build 18363.900.

In about:support, I'm not using WebRender (compositing is showing Direct3D 11 (Advanced Layers)), and my GPU is a Intel HD Graphics 630, on a i5-7600K.

Actual results:

The string stored count for each js file in about:memory after doing a measure increase with every refresh, ballooning out the memory usage.

The count goes higher than the max_entries and max_serialize_back limits, so it's probably not related to history / the back button?

Expected results:

I'd either expect the memory usage to be constant with refreshes (as most of the JS files are unchanged so it shouldn't need a new, fresh copy of them in RAM), or worst-case it should go to count=10 in about:memory -> measure for the JS file strings to match the browser.sessionstore.max_serialize_back limit set in about:config, if it does have to have a copy of the JS file strings for every page in the back history

Attached file about support.txt (deleted) β€”
Attached file DxDiag.txt (deleted) β€”
Summary: Memory increase after refreshing, never goes down. → Memory increases after refreshing, never goes down.

Attaching file "firefox memory close tab.jpg", this is what my memory usage does when I close the single tab that I had been refreshing for a few days (maybe 106 refreshes, based on the strings count in about:memory -> measure)

Attached image firefox memory close tab.jpg (deleted) β€”

Hey Michael,
I am able to reproduce this using your steps on the latest version of Firefox Nightly 80.0a1 (2020-07-02), beta 78.0b3 and release 78.0.1.
With every refresh the memory usage increases. This doesn't occur on Chrome for instance.
For me the memory stabilizes and goes back to normal if the refreshing is stopped.

Setting a component for this issue in order to get the dev team involved.
If you feel it's an incorrect one please feel free to change it to a more appropriate one.

Andrew can you take a look into this?

Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Content Processes
Ever confirmed: true
Flags: needinfo?(continuation)
Product: Firefox → Core

It looks like you have devtools open. This is probably another instance of bug 1084605. I think that dev tools intentionally keep some kind of references to closed pages so that you can still debug them, but as you have experienced if you are doing a lot of page reloading it can cause issues. Hopefully the DevTools team will be able to address this at some point.

Component: DOM: Content Processes → General
Flags: needinfo?(continuation)
Product: Core → DevTools

Ah yes! I did have my devtools open and forgot to mention it. Good spot.

The severity field is not set for this bug.
:Honza, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(odvarko)
Summary: Memory increases after refreshing, never goes down. → Memory increases after refreshing with DevTools open

Michael, thanks for the report!

Couple of questions:

  • What exact page did you use for testing?
  • Is the memory released when you close DevTools?

Honza

Severity: -- → S3
Flags: needinfo?(odvarko)

We have a very similar bug logged at Bug 1682212, let's merge those.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: