Firefox becomes unresponsive for more than a minute after closing the browser toolbox (which was opened for a long time)
Categories
(DevTools :: General, defect, P2)
Tracking
(Not tracked)
People
(Reporter: itiel_yn8, Unassigned)
References
(Blocks 2 open bugs)
Details
(Keywords: memory-leak, perf)
Attachments
(1 file)
|
49.39 KB,
text/plain
|
Details |
Thank you for helping make Firefox better. If you are reporting a defect, please complete the following:
What were you doing?
- (Optional; Not sure if doing this is required to make this reproduce) Be on a profile with lots of tabs open (in my case it's 730, but the vast majority of them are on-demand)
- Open the Browser Toolbox, do nothing with it. Let it sit in the background and continue your normal browsing session
- Wait for Firefox's processes to bubble up to something around 6GB~ of RAM usage (the longer you wait the bigger it'll get, and the hang will also get longer)
- Close the Browser Toolbox
What happened?
Firefox is unresponsive. It takes a while until the processes cool down to normal RAM usage, and then Firefox is responsive again.
What should have happened?
Slightly more normal RAM usage during the time when the Browser Toolbox is open, and no hung Firefox after closing it.
Anything else we should know?
Profile:
https://share.firefox.dev/31Hrodb
Updated•5 years ago
|
Comment 1•5 years ago
|
||
According to the profile, this seems to be related to pool cleanup.
This might have been improved by Bug 1684965. Pool::getParent was known to be slow and was significantly improved by this bug.
Itiel: sorry for the late ping, but can you test again with a recent Nightly and see if it performs better?
(In reply to Julian Descottes [:jdescottes] from comment #1)
According to the profile, this seems to be related to pool cleanup.
This might have been improved by Bug 1684965. Pool::getParent was known to be slow and was significantly improved by this bug.Itiel: sorry for the late ping, but can you test again with a recent Nightly and see if it performs better?
Not in the slightest. Memory usage got to 8.2GB and Nightly was too much sluggish that I couldn't even press the Profiler button.
Nightly then hang for ~5 minutes (after closing the toolbox), with the memory usage going up to 8.7GB, then it went back down to a more sane 2GB and the UI became responsive again.
Let me know if you'd like to get a fresh profile and I'll try again.
Updated•4 years ago
|
Updated•4 years ago
|
Itiel, we fixed lots of performance issues in 5 years and especially some in netmonitor to clear request data of defunct documents. I'm curious if you still have performance issues with the browser toolbox ?
I stopped using Nightly with the toolbox open long ago as this caused too much slowness for me.
I'll leave it open and report back. Leaving needinfo on me to check.
Yep, issue is still definitely there. I don't have to do anything other than open the toolbox, leave it open and go on about my daily browsing session, and Nightly will gradually become unbearable to use.
Closing the toolbox then fixes this almost immediately.
(In reply to Itiel from comment #5)
Yep, issue is still definitely there. I don't have to do anything other than open the toolbox, leave it open and go on about my daily browsing session, and Nightly will gradually become unbearable to use.
Thanks for giving it another try.
Are you always using the network monitor panel in the browser toolbox?
I imagine netmonitor will always be slow until we implement bug 1308441.
Closing the toolbox then fixes this almost immediately.
Good to know that at least you can recover by restarting the tools!
I quickly tested with a browser toolbox with many tabs for an hour or so, with only the netmonitor opened.
I ended up with 6k requests, Firefox was still responsive, but netmonitor has 100ms jank on each new request:
https://share.firefox.dev/45mAFbo
There is nothing to optimize here, only a viewport will improve the situation.
(In reply to Alexandre Poirot [:ochameau] from comment #6)
Are you always using the network monitor panel in the browser toolbox?
I imagine netmonitor will always be slow until we implement bug 1308441.
Hm, not sure where you got the impression that I'm using netmonitor? I'm usually in the inspector (without loading any other toolbox components first).
In my last attempt I just key-comboed Ctrl+Alt+Shift+I and forgot about it, without even interacting with the UI.
(In reply to Itiel from comment #8)
(In reply to Alexandre Poirot [:ochameau] from comment #6)
Are you always using the network monitor panel in the browser toolbox?
I imagine netmonitor will always be slow until we implement bug 1308441.Hm, not sure where you got the impression that I'm using netmonitor? I'm usually in the inspector (without loading any other toolbox components first).
There was some mentions of netmonitor in comment 0 profiler. But it may be the background listening of network requests which is done without opening the netmonitor.
In my last attempt I just key-comboed Ctrl+Alt+Shift+I and forgot about it, without even interacting with the UI.
I don't easily reproduce something really slow with only the inspector.
A day with 700+tabs with browsing on treeherder, bugzilla, searchfox.
Here is a record of the browser toolbox process:
https://share.firefox.dev/3UycErI
And one on the firefox parent process:
https://share.firefox.dev/3U0YIGD
| Reporter | ||
Comment 10•1 year ago
|
||
Would you like me to record fresh profiles? (and if so, what preset should I choose, when do I start/stop recording, and how long should the recording session take?)
(In reply to Itiel from comment #10)
Would you like me to record fresh profiles? (and if so, what preset should I choose, when do I start/stop recording, and how long should the recording session take?)
It could be helpful to understand if you are hitting something specific.
Using "Firefox/Nightly" preset should be enough, if Firefox is barely responsive, recording just a few seconds should be enough to spot slow running code.
It may be in parent process or in one of the many content processes. You can search for "devtools" in the flame graph to see if there is anything interesting to share.
Also, note that when you are recording the profile from Firefox, you will only record the backend/server part of the Browser Toolbox.
If you want to record the browser toolbox slowness, you can record another profiler by pressing the Browser Toolbox key shortcut from the Browser Toolbox itself. It will open a second Browser Toolbox, from which you can record another profile via the Performance panel.
But if Firefox is freezing, the first type of profile should be enough.
If only the Browser Toolbox is freezing, the second type of profile will be more useful.
Description
•