Firefox temporarily freezes when opening new tabs
Categories
(Core :: DOM: Content Processes, defect, P3)
Tracking
()
Performance Impact | none |
People
(Reporter: sonichedgehog_hyperblast00, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
9.24 KB,
text/plain
|
Details |
![]() |
||
Comment 1•7 years ago
|
||
Reporter | ||
Comment 2•7 years ago
|
||
![]() |
||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Reporter | ||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
![]() |
||
Updated•7 years ago
|
Reporter | ||
Comment 8•7 years ago
|
||
This is still a problem in Firefox 65 and latest openSUSE Tumbleweed snapshot. Has an alternative been found yet?
Like I said, a very easy fix for the time being would be an option to spawn the maximum number of processes when Firefox starts. The freezing only occurs because the browser keeps starting and stopping new processes each time you open or close a tab. Having the maximum number of window processes open from the start would move those delays to startup and we'd never experience any hiccups during usage.
Comment 9•7 years ago
|
||
What version of fontconfig is present on the problem system? I think I remember seeing a problem like this where updating to a more recent fontconfig led to a big improvement.
Reporter | ||
Comment 10•7 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #9)
2.13.1
I use openSUSE Tumbleweed which is a rolling release distribution updated every few days, so it likely has the latest versions of all important packages.
Comment 11•7 years ago
|
||
OK, sounds like this is different, then. The previous issue was resolve in fontconfig 2.13, IIRC.
Comment 12•6 years ago
|
||
I'm on Ubuntu 19.10, just installed FF 71.0 (64-bit). This issue affects me as well and is a show-stopper. BTW, for me also closing tabs takes up to a few seconds.
Comment 13•5 years ago
|
||
Ah, I'm glad I found this issue.
So, I stopped tab-hoarding just recently, and now I'm using only a few tabs at the same time. That means I no longer have all content processes running in the background, as they are spawned on demand, one per each new tab, until hitting the dom.ipc.processCount
limit.
I can observe, that when a new tab is opened (from a bookmark or a link click), and a new content process is going to be spawned for that tab, there is a 1.5 - 2 s delay until the tab actually starts loading the webpage (the moment when spinner animation and DNS lookup kicks in).
I've captured such a situation, and here is the output from the profiler: https://perfht.ml/2WukxA2.
I'm using Ubuntu 20.04, I tried clean profiles, and Firefox 75, 76, Beta, Nightly. The issue is still present. It's quite infuriating, to be honest.
As a workaround, I set dom.ipc.processCount
to 2
, so there are no new processes spawned after opening 2 tabs, and new tabs (3, 4..) start loading webpages immediately. But obviously, that isn't a solution, and I'd rather utilize more processes.
Even if it was possible to enforce spawning the maximum number of content processes at once (as the OP suggests), that isn't a solution either, given you guys can't reproduce the issue, so there must be something buggy about the IPC mechanism.
Thanks in advance for investigating the issue.
Comment 14•5 years ago
|
||
Can you check that the list of modified preferences in about:support? In particular, dom.ipc.processPrelaunch.enabled - we should prelaunch processes when we have 'idle' time, so opening a new tab should just use an existing process.
If you could take a new profile that would let us verify (profiler UI is now built in; you can use Customize off the 'hamburger' menu to add a button for it to the toolbar).
Thanks
Reporter | ||
Comment 15•5 years ago
|
||
Update: I can't say I've seen this issue recently at least not in obvious form, though I do have several tabs open (albeit inactive as I don't select them after startup). When I close more of them I'll take a closer look. At the moment my OS (openSUSE Tumbleweed x64) updated me to Firefox 78.0.2.
As for the question; dom.ipc.processPrelaunch.enabled is at the default value of true. I attached my Important Modified Preferences entries from about:support in this comment.
Comment 16•4 years ago
|
||
I'm also experiencing this with dom.ipc.processPrelaunch.enabled == true on Kubuntu 20.04.2. Doesn't happen always, but frequently enough.
Comment 17•4 years ago
|
||
So here is a profile: https://share.firefox.dev/3nm5HZC
Comment 18•4 years ago
|
||
I'm using Auto tab discard add-on, not sure if this has something to do with it.
Comment 19•4 years ago
•
|
||
I'm using Auto tab discard add-on, not sure if this has something to do with it.
Nope, it still reproduces when the extension is disabled.
Comment 20•4 years ago
|
||
I've captured such a situation, and here is the output from the profiler: https://perfht.ml/2WukxA2.
Presuming the stacks there were accurate, a ton of time seems to be spent parsing GTK CSS themes. We currently initialize GTK for every process, though that's being removed right now in bug 1635451. We've noticed a clear but small speed benefit here, but I guess in extreme circumstances (very complex themes or themes that trigger worst case behavior in GTK's parser), it might be a huge speedup.
So here is a profile: https://share.firefox.dev/3nm5HZC
There's indeed a 2s period here where...nothing seems to happen? Though the new tab seems to have forced the WebExtensions process to initialize, which happens about 1s in that period.
Comment 21•4 years ago
|
||
I believe i haven't seen this after enabling fission on release.
Comment 22•4 years ago
|
||
(In reply to Lyubomir from comment #21)
I believe i haven't seen this after enabling fission on release.
sonichedgehog, do you agree?
Reporter | ||
Comment 23•4 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #22)
(In reply to Lyubomir from comment #21)
I believe i haven't seen this after enabling fission on release.
sonichedgehog, do you agree?
I would say yes. Haven't seen this in well over an year myself, during which I also changed Linux distributions and didn't notice it in either (openSUSE -> Manjaro). I may have enabled a few custom settings that improved it, I presume the relevant ones have become defaults since? If I see this particular issue again I can hopefully reopen it, for now though it feels safe to close.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•