Closed Bug 1569625 Opened 5 years ago Closed 2 years ago

[Snap] Firefox is slow to open, close and switch tabs in Xwayland

Categories

(Core :: Widget: Gtk, defect, P3)

68 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: aceler, Unassigned)

References

(Blocks 1 open bug)

Details

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

Steps to reproduce:

Firefox is launched as a XWayland app, i.e. just launched under wayland session.

When Firefox is launched as an X11 app in an X11 session, or it is launched as a native wayland app in a wayland session using GDK_BACKEND=wayland env, all is fine.

Actual results:

Firefox opens, closes and switch tabs with a very big latency. This happens only if the window is in a maximized state. If the window is in non-maximized state, or if the window in in a full-screen mode (F11), Firefox works as expected.

Tried with a new profile and safe-mode. I have AMD RX560 with open-source videodriver under Ubuntu 19.04.

Hi @aceler, I don't have the proper environment to test it. What I can do for now is to set a component and maybe someone from dev's team could give us a hand.
Thanks.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Priority: -- → P3

Hi,

I confirm the issues reported by @aceler, I have exactly the same behavior.
I'm using Firefox version 70.0 on Arch Linux

Confirm. Firefox 71 beta affected aswell...

(In reply to vita.amaro from comment #3)

Confirm. Firefox 71 beta affected aswell...

By the way it lag only if i use some extension hiding top gnome panel. And only on wayland. If i use x or turn off extension everything okey.

I've the same annoying problem on wayland (FF nightly 78.0a1 - FF 76.0.1).

Same here (FF78), I can confirm that this bug is present when using the "hide top bar" gnome-shell extension

This also happens on Wayland also without an extension hiding the top-bar. (FF78). Here I noticed the issue for the first time, after setting the panel ("Dash to Panel") to autohide and FF used the whole screen. But this might be similar to top-bar-hiding(?).

https://github.com/mozilla/nixpkgs-mozilla/issues/163#issuecomment-822058334 might be related: Note that FF 67 introduced one-profile-per-install which was worked around (in nixpkgs) by passing SNAP_HOME=firefox in a wrapper script. That's no longer necessary since FF 69, which has MOZ_LEGACY_PROFILES='1' for that and it caused real harm for me in that I experienced quite similar symptoms as the OP since FF 85. Getting rid of the SNAP_HOME setting fixed it for me. Not sure if this generalises much to other users, but it might help devs to bin down what's going on.

It appears that (the length of?) XDG_DATA_DIRS also plays a role: There are 52 entries for me (most of which are GNOME-specific paths into the Nix store) and if I unset them, firefox is no longer slow.

I bisected the entries in XDG_DATA_DIRS and found out that it's not the length, but the size of one the directories: ~/.nix-profile/share is generated by home-manager and is huge. Apparently, Firefox with SNAP_NAME=firefox will repeatedly parse those directories and I've no idea why that's necessary. Something similar might apply to huge ~/.local/share folders.

Blocks: snap
Summary: Firefox is slow to open, close and switch tabs in Xwayland → [Snap] Firefox is slow to open, close and switch tabs in Xwayland

Can you update whether you still have the issue ?

Flags: needinfo?(aceler)
Severity: normal → S3

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?(aceler) → needinfo?(stransky)
Flags: needinfo?(stransky)
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.