Closed Bug 1604204 Opened 6 years ago Closed 3 years ago

Firefox lags (hangs for 5+ seconds) when opening a new tab

Categories

(Core :: Widget: Gtk, defect)

71 Branch
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: vmagerya, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/78.0.3904.108 Chrome/78.0.3904.108 Safari/537.36

Steps to reproduce:

Using Firefox 71 x64 on Linux, open a new (blank) tab, or switch to an
older inactive one.

Actual results:

Sometimes Firefox hangs (becomes unresponsive) for multiple seconds.
Opening the second one immediately after is fairly fast. I haven't found
a consistent pattern.

Here's a profile capture of one such occurrence:
https://perfht.ml/38K3qzq

Expected results:

I expect to see a blank tab within less than half a second.

I've tried this on a clean profile w/o plugins too: the problem seems to
remain (maybe to a lesser extent, but its hard to tell).

Some similar reports recommend checking "Prevent accessibility services
from accessing your browser" and setting the proxy to "no proxy" -- I did
both, no effect.

Hi
I tried to replicate the issue using Ubuntu 18.04 and the latest Firefox Nightly release 73.0a1
But i see no issue with new tab delay

Could you please download the latest Firefox Nightly release from here: https://nightly.mozilla.org/ and retest the problem.

If you still have the issue please create a new profile, you have the steps here:https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles?redirectlocale=en-US&redirectslug=Managing-profiles#w_starting-the-profile-manager

Lastly test if the issue is reproducible in safe mode, here is a link that can help you:
https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode

Regards
Pablo

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

So, I've installed Nightly 73.0a1 (2019-12-20) and started with
a new profile. Overall it's pretty bad:

  1. First I tried to open 7 new tabs (hitting Ctrl-T 7 times in a
    succession) using the default settings of a clean profile (with
    the profiler being the only new addon installed); here's the
    trace:

    https://perfht.ml/2sNCT3X

    Note that there are up to 1.5 second delays between tabs being
    opened, and the whole process takes at least 5 seconds. Firefox
    is barely responsive during the whole time.

  2. Next, I changed the home page and the new tab page to be blank
    pages, restarted the browser, and tried to open 7 tabs the same
    way. Here's the trace:

    https://perfht.ml/2sb1jnZ

    Note that only 6 tabs got opened; due to lag probably. The delays
    are as bad as before, no noticeable change.

  3. One more time, (after a browser restart) the same 7 Ctrl-Ts:

    https://perfht.ml/36U82Bf

    Only 5 tabs got opened this time. The lag is as before.


Overall Nightly is no better than 71. This is not surprising,
because the problem is now new.

Anyway. What I noticed in the original traces is that a new worker
process is seemingly being spawned during the lag. This got me
thinking, and I tried to change the "Content process limit"
setting from the default of 8 to 1, so that now new processes
are started. Lo and behold, this fixes the lag.

Does this mean I need to limit myself to single-threaded Firefox?

I'm not sure what makes starting new workers so slow on my
machine, of course.

If this makes any difference, the OS I'm running this on is
Ubuntu 18.04.3 LTS (amd64). The Nightly was launched from an
in-memory disk, although the profile is on an SSD. Safe Mode
makes no difference.

Severity: normal → S3

Vitaly does this still reproduce for you?

Flags: needinfo?(vmagerya)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:stransky, since the bug has recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(vmagerya) → needinfo?(stransky)
Flags: needinfo?(stransky)
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.