Closed Bug 1762816 Opened 3 years ago Closed 1 year ago

Slow startup (~30 seconds)

Categories

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

Firefox 99
Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox119 --- wontfix
firefox120 --- wontfix
firefox121 --- fixed

People

(Reporter: yoasif, Assigned: stransky)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

From: https://www.reddit.com/r/firefox/comments/tvqzqn/firefox_99_takes_30s_to_startup/

Firefox is too slow to startup on my Arch Linux box. It takes almost 30s to start on an SSD + Hexacore CPU.

​​### Basic information

Steps to Reproduce:

Start Firefox.

Expected Results:

Actual Results:

30 second startup.


Performance recording (profile)

Profile URL: https://share.firefox.dev/3DFu7VR

System configuration:

OS version: Arch Linux
GPU model: Intel(R) HD Graphics P630 (KBL GT2)
Number of cores: 8 (2 thread per core)
Amount of memory (RAM): 32G

More information

It was fine, until some days ago (I suspect it is an upgrade to 98/99 that made it this slow).
Here what I've tried: - I uninstalled firefox, and reinstalled it. - Removed the .mozilla folder and retried. - Tried safe-mode, - Refreshed firefox and cleared cache ...


Thanks so much for your help.

OS version: Arch Linux
GPU model: Intel(R) HD Graphics P630 (KBL GT2)
Number of cores: 8 (2 thread per core)
Amount of memory (RAM): 32G

Here is the about:support information
https://0x0.st/obHY.txt

Here is the profiling report
https://0x0.st/obHW.json

Attached file about:support

I think this is caused by the DBUS connection in the LookAndFeel constructor.

Component: Performance → Widget: Gtk
Regressed by: 1734934

Yeah, your DBUS setup seems broken. However this seems like a slightly different issue from bug 1755419, and new_for_bus_sync doesn't take a timeout value, so we can't just try to bail earlier...

journalctl -f should give you hints on what is going wrong, or alternatively launching firefox with MOZ_LOG=LookAndFeel:5 in the environment as well.

Flags: needinfo?(m.iduoad)
See Also: → 1755419
Has Regression Range: --- → yes

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

Yeah, your DBUS setup seems broken. However this seems like a slightly different issue from bug 1755419, and new_for_bus_sync doesn't take a timeout value, so we can't just try to bail earlier...

journalctl -f should give you hints on what is going wrong, or alternatively launching firefox with MOZ_LOG=LookAndFeel:5 in the environment as well.

The problem ended up to be about DBUS. After removing xdg-desktop-portal-wlr FireFox is fast to start again.

thank you everyone!

Flags: needinfo?(m.iduoad)
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
Flags: needinfo?(stransky)

Don't autostart org.freedesktop.portal.Desktop if it's not running. That blocks Firefox start for 30~ seconds,
makes Firefox non-responsible and locks Firefox profile (another launch throws "Firefox is running but not responding" dialog).

Assignee: nobody → stransky

I do see the bug after every login to Gnome session and it's very annoying.

Flags: needinfo?(stransky)
Status: RESOLVED → REOPENED
Priority: -- → P2
Resolution: INVALID → ---

g_bus_watch_name() may be used to monitor the org.freedesktop.portal.Desktop interface and re-init preferences if it's available.

g_bus_watch_name() works so I'll do follow up to fetch color scheme when org.freedesktop.portal.Desktop is up.

Flags: needinfo?(stransky)
Attachment #9361210 - Attachment description: Bug 1762816 [Linux] Don't autostart org.freedesktop.portal.Desktop if it's not running r?emilio → Bug 1762816 [Linux] Watch org.freedesktop.portal.Desktop DBus name and get session data only if it's running r?emilio
Flags: needinfo?(stransky)
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/d160276b237a [Linux] Watch org.freedesktop.portal.Desktop DBus name and get session data only if it's running r=emilio

You need to put mInitialized=true back right?

Flags: needinfo?(stransky)

Updated, Thanks.

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/86de5a0de5cd [Linux] Watch org.freedesktop.portal.Desktop DBus name and get session data only if it's running r=emilio
Status: REOPENED → RESOLVED
Closed: 3 years ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: