Closed
Bug 1512592
Opened 6 years ago
Closed 4 years ago
Developer tool (F12) fills up the memory
Categories
(DevTools :: Console, defect, P2)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1682212
People
(Reporter: baloand, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [specification][type:bug][MemShrink:P3])
Attachments
(2 files)
What did you do?
================
1. I work on a project that deals sometimes with huge arrays which arrive through AJAX. I use AngularJS.
2. In the Firefox window the Developer Tools is always open, as I check what's going on.
3. I regularly refresh the page.
What happened?
==============
After a while my PC is killed, Firefox use more than 2.5 GB of memory. "Persist logs" is not turned on.
Turning off Dev.Tools doesn't help, only if I visit another site, or I close Firefox window.
What should have happened?
==========================
I suppose, when refreshing the page, Dev.Tools shoud clean up as well.
Is there anything else we should know?
======================================
This problem seems to belong to Dev.Tools. When I retry the process without turning it on, no problem occurs.
This is the same in plain Firefox and in Developer Edition.
I coudn't figure out, which setting coud change it, I tried turnin off caching, etc.
Updated•6 years ago
|
Component: General → Untriaged
Product: developer.mozilla.org → Firefox
Comment 2•6 years ago
|
||
Hello Baloand, Could you please provide memory report (https://developer.mozilla.org/en-US/docs/Mozilla/Performance/about:memory) when you encounter this issue? This will help dev to look into the root cause of the issue. Thanks!
Flags: needinfo?(baloand)
I upload a memory map file. The memory usage was above 1 GB again.
Flags: needinfo?(baloand)
Comment 5•6 years ago
|
||
Hi Eric, can you please look into attached memory report? Thanks!
Flags: needinfo?(erahm)
Comment 6•6 years ago
|
||
It looks like a ton of strings and Array objects are being kept alive. I'm not sure why devtools would cause this, are you doing a lot of logging?
> 1,193.28 MB (100.0%) -- explicit
> ├──1,112.81 MB (93.26%) -- window-objects
> │ ├──1,109.78 MB (93.00%) -- top(https://localhost:3005/, id=2147483649)
> │ │ ├────617.79 MB (51.77%) -- js-zone(0x9943000)
> │ │ │ ├──577.71 MB (48.41%) ++ strings
> │ │ │ ├───26.53 MB (02.22%) ++ (12 tiny)
> │ │ │ └───13.55 MB (01.14%) ── unused-gc-things
> │ │ └────492.00 MB (41.23%) -- active/window(https://localhost:3005/)
> │ │ ├──393.46 MB (32.97%) -- js-realm(https://localhost:3005/)
> │ │ │ ├──384.55 MB (32.23%) -- classes
> │ │ │ │ ├──343.69 MB (28.80%) ++ class(Array)/objects
> │ │ │ │ ├───15.52 MB (01.30%) ++ class(Object)/objects
> │ │ │ │ ├───14.17 MB (01.19%) ++ class(Function)/objects
> │ │ │ │ └───11.17 MB (00.94%) ++ (11 tiny)
> │ │ │ └────8.91 MB (00.75%) ++ (5 tiny)
> │ │ ├───92.32 MB (07.74%) ++ dom
> │ │ └────6.21 MB (00.52%) ++ (3 tiny)
> │ └──────3.03 MB (00.25%) ++ top(about:newtab, id=2147483657)
I'm also seeing things like this:
> 74.82 MB (06.27%) -- string(length=36, copies=1089581, "d0a5da20-feeb-11e8-beaa-95b3bb53e488")
So that's over 1 million copies of a UUID.
Component: Untriaged → Console
Flags: needinfo?(erahm)
Product: Firefox → DevTools
Whiteboard: [specification][type:bug] → [specification][type:bug][MemShrink]
Hi!
As I mentioned, the app I work on sometimes deals with huge arrays that arrive through AJAX. It's a querying app.
The reason I think it's a devtools bug becouse when F12 is not on, the problem doesn't occur. It seems to me, that the whole array stays in memory, that's why You see these values.
Anyway I have to admit, that I have no idea how I could force something to remain in memory despite using F5, other than turning on "persist logs". But it's not turned on.
I've put an event handler in the JS code (window.onbeforeunload), which cleans up these arrays before reload executes, and in this case the problem doesn't occur, or at least the increase is negligible.
Comment 8•6 years ago
|
||
I did a test myself:
1. Started a fresh console - Took a memory trace using the toolbox's Memory panel
2. Logged a massive amount of objects
3. Cleared console - Took another trace
The snapshots can be loaded using DevTools' Memory panel: https://www.dropbox.com/s/a85qotzd59xt6dt/console-fxsnapshots.zip?dl=0
Nicolas wanted to look into this.
Blocks: devtools-performance
Flags: needinfo?(nchevobbe)
Updated•6 years ago
|
Priority: -- → P2
Updated•6 years ago
|
Whiteboard: [specification][type:bug][MemShrink] → [specification][type:bug][MemShrink:P3]
Updated•5 years ago
|
Flags: needinfo?(nchevobbe)
Updated•5 years ago
|
Updated•5 years ago
|
Type: enhancement → defect
Comment 9•4 years ago
|
||
Consolidating reload devtools leak bugs to Bug 1682212
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•