Closed Bug 1644310 Opened 6 years ago Closed 5 years ago

Reloading page increase memory consumption

Categories

(DevTools :: General, defect, P3)

79 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1682212

People

(Reporter: vicenzi.alexandre, Unassigned)

Details

Attachments

(1 file)

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

Steps to reproduce:

Reloading a page multiple times when Developer Tools is open increases memory consumption and never decreases, more like a memory leak somewhere.

To put in context a bit, I've been working on a website with live reload (Hugo) and every time I change something in HTML, CSS the site is reloaded on the browser. As I leave Developer Tools open to easily inspect my changes I noticed some weird memory consumptions by FF, my tab eats 2.5 GB of RAM after a while.

Multiple times can be assumed as a big number, maybe 100 times.

If you open a page and open Dev Tools and start pressing F5 multiple times (10 times) you will notice the process memory increasing every time by a bit.

Closing Developer Tools does not seem to fix, I need to either close the tab or run GC manually to try reducing it.

Actual results:

After the page is reloaded multiple times the memory used by the process is increased out of proportions and automatic GC does not clean it.

My page was initially 50 MB after ~10 reloaded jumped to almost 300 MB and decrease only to 260 MB. It would make sense to go back near 50 MB, its still the same page. If you do this 100 times it can go way over 1 GB.

Expected results:

I expect memory to increase, but GC should at least be able to cycle it after a while and reduce a bit.

I've been using Firefox Developer Edition mainly, but I managed to reproduce also on a clean Nightly 79.0a1 (2020-06-08) installation. I'm on Ubuntu 20.04.

Also, a note, when tabs are eating a lot of memory firefox-bin seems to also increase its memory consumption.

Hi, thanks for the report

Can you please attach a memory report? Here are the steps to create one from about:memory

  1. Wait until Firefox is consuming a large amount of memory
  2. Enter about:memory in the URL bar and press enter
  3. Click "Measure and save" (optionally with "anonymize" checked to hide URLs)
  4. Save the memory report somewhere
  5. Attach the report to this bug

I 've moved this over to a component so developers can take a look over it.

Best regards, Clara.

Component: Untriaged → Memory
Flags: needinfo?(vicenzi.alexandre)
Product: Firefox → DevTools
Attached file memory-report.json.gz

Hi,

Memory report is attached.
Memory usage on system for tab was above 1 GB.
Tested on Nightly 79.0a1 (2020-06-25).
Only one tab was open (with dev tools also) during testing.
Memory still does no decrease automatically.
Memory only decreases if I closed Dev Tools and click Minimize memory usage in about:memory.
After this, memory was below 200 mb.

Flags: needinfo?(vicenzi.alexandre)

The "memory" component is for the memory tool in devtools. In this case the report is more about memory usage of devtools in general, so I'm moving this bug to General :-)

Closing Developer Tools does not seem to fix, I need to either close the tab or run GC manually to try reducing it.

I think that if running GC fixes it at this point, then the memory will be freed eventually.
But Devtools retaining the memory while it's open is a big issue already.

I believe we have some other related bugs about that, I'll let other devtools folks see if there's new information here.

Component: Memory → General

@Julien: isn't this a dup of bug 1645325 (both about liver reload)

Honza

Flags: needinfo?(felash)

That could be indeed. We could have several issues, but it's difficult to assess if we don't start fixing them at all.

Flags: needinfo?(felash)
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

Duplicate pointed out by :christoph.mosimann at https://bugzilla.mozilla.org/show_bug.cgi?id=1682212#c26

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

Attachment

General

Created:
Updated:
Size: