Open Bug 1876935 Opened 10 months ago Updated 2 months ago

Very slow startup > 2 mins

Categories

(Toolkit :: Startup and Profile System, defect)

Firefox 121
defect

Tracking

()

UNCONFIRMED

People

(Reporter: martin, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(3 files)

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

Steps to reproduce:

Turn on laptop
Star firefox
More than 2 or 3 min wait for it to be available for use

Actual results:

Takes more than 2 or 3 minutes to be available for use
Attaching links to the vids cause you have to see it to believe it:
Original vid of the time taken for Firefox to start:
https://photos.app.goo.gl/Hhs694cWYioz5RHS7

Comparison of Brave on the same system:
https://photos.app.goo.gl/XPjjLMNpqzJkhjp57

Expected results:

be more expeditive. It actually discourages usage.

Please let me know if you need anything else. Thanks for the work, appreciated.

I measured the time in the vid and it was 5:18 minutes. :'(

Setting this report to Toolkit -> Startup and Profile System - if this is not the right component, please assign a more suitable one. Thanks!

Component: Untriaged → Startup and Profile System
Product: Firefox → Toolkit
See Also: → 1847463

It would be useful to generate and share a startup profile of Firefox here. See the documentation for how to do that.

Flags: needinfo?(martin)

Hi, thanks for the reply. Sorry for the newbie question, but can´t seem to find where to config this the environment variable MOZ_PROFILER_STARTUP=1. In which directory do I find the file to config this. Thanks.

Flags: needinfo?(martin)

Just to tag you. Comment above.

Flags: needinfo?(dtownsend)

It's an environment variable you need to set in your shell. You could do it by just prepending it to running firefox like MOZ_PROFILER_STARTUP=1 firefox

Flags: needinfo?(dtownsend) → needinfo?(martin)
Attached image MOZ_PROFILES_STARTUP=1
Flags: needinfo?(martin)

You need to either do both in one command line or export the variable I think. You then need to follow the instructions to generate and shared the profile

Flags: needinfo?(martin)
Attached image Profiler
Flags: needinfo?(martin)

Thanks. Sorry for the newbie one. I did and the programme went crazy. I'll detail:

  1. In the meantime, went to about:preferences#privacy and saw a whole lot of webpages with 'Notification' settings (webhooks I've read). Most were 'Stopped', few 'Running', but many from webpages I didn't remember. Thought maybe those were pinging at the beginning and slowing things down. Erased them all. Closed Firefox. Opened again
  2. Voila! Surprise, it took way less time to startup. Considerably less, like a minute instead of the 5 or 6 before.
  3. Tried to do the profiling once I figured out the environment variables. Set them up as per the manual
  4. The profile addon did not start profiling once I started Firefox. It has never started since even repeating the .png process I attached with echo confirmation of environment variable setup.
  5. Firefox has completely collapsed. It never starts, I've waited even 15 minutes for it to start, but nothing happens (yesterday night)
  6. Filing this from Brave. Retried today and it does start after more than 10 min, but it is very unresponsive and constantly showing messages of "FIREFOX WEB BROWSER" is not responding FORCE QUIT | WAIT
  7. Even manually running the Profiler addon recording at start (MOZ_PROFILES_STARTUP=1 doesn't work apparently), when I CAPTURE I have no idea where the file is stored and per the .png attached it doesn't upload automatically.
  8. Please advise, excusing the newbieness more than willing to go the whole 9 yards to help improve Firefox.
Flags: needinfo?(dtownsend)

Later today will run a Linux perf and attach it into the profiler.mozilla.org as can't seem to make the profiler addon work. Will get back later.

Hi again. Update:
1 In the meantime, a system update (kernel) happened. Now on the 6.5.0-17 and had to upgrade to the specific perf cause the latest update didn't work.
2 Rebooted the machine
3 Run the linux profiling starting Firefox from the perf command
4 Took 22:30 minutes (!) to become vailable. There were 2 windows opened: 1st with 19 tabs and the 2nd with 1. Stopped the perf command and it closed Firefox
5 Perf file said 65Mbs, but was actually a 191Mb .perf file
6 Because I had to close firefox, actually waiting for it to open again...
7 Uploaded the test.perf file to profiler. Here's the permalink: https://share.firefox.dev/3Uydcit
8 I learned something new today. Thanks for that.

I really hope it helps. Good luck and thanks again for the help.

Martín

Just as an extra comment, in the meantime it also happened that I was opening Firefox with fewer tabs. It did help, but unless I missed something in the past months the specs of the machine can handle the load. But let me know if you believe otherwise.

There have been performance issues with ubuntu 22 lately I must add, but the firefox problem started way before. I can even say it was the first crumb in the path.

(In reply to martin from comment #13)

Hi again. Update:
1 In the meantime, a system update (kernel) happened. Now on the 6.5.0-17 and had to upgrade to the specific perf cause the latest update didn't work.
2 Rebooted the machine
3 Run the linux profiling starting Firefox from the perf command
4 Took 22:30 minutes (!) to become vailable. There were 2 windows opened: 1st with 19 tabs and the 2nd with 1. Stopped the perf command and it closed Firefox
5 Perf file said 65Mbs, but was actually a 191Mb .perf file
6 Because I had to close firefox, actually waiting for it to open again...
7 Uploaded the test.perf file to profiler. Here's the permalink: https://share.firefox.dev/3Uydcit
8 I learned something new today. Thanks for that.

I really hope it helps. Good luck and thanks again for the help.

Unfortunately this profile doesn't look terribly useful as it doesn't appear to have symbols included. Was this produced from a Mozilla build of Firefox or one installed from your distribution's package manager?

Flags: needinfo?(dtownsend) → needinfo?(martin)

Hi, as commented, profiling through profile.firefox.com doesn't seem to work. No idea why. I follow the instructions and a) it doesn't start at startup of the programme and b) the addon doesn't upload automatically the profile generated to the website. This is why I created the profile through the linux perf tool.

Please advice.

Flags: needinfo?(martin) → needinfo?(dtownsend)

(In reply to martin from comment #16)

Hi, as commented, profiling through profile.firefox.com doesn't seem to work. No idea why. I follow the instructions and a) it doesn't start at startup of the programme and b) the addon doesn't upload automatically the profile generated to the website. This is why I created the profile through the linux perf tool.

Please advice.

Can you answer my question? Was this produced from a Mozilla build of Firefox or one installed from your distribution's package manager?

Flags: needinfo?(dtownsend) → needinfo?(martin)

I install these commands and then do manual updates:
wget -O ~/Downloads/Firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64"
sudo tar xjf ~/Downloads/Firefox.tar.bz2 -C /opt/
sudo ln -s /opt/firefox/firefox /usr/bin/

I was instructed to avoid snap in some other interaction here.

Cheers

Flags: needinfo?(martin) → needinfo?(dtownsend)

(In reply to martin from comment #11)

  1. Even manually running the Profiler addon recording at start (MOZ_PROFILES_STARTUP=1 doesn't work apparently),

There's a typo in the environment variable name, it is MOZ_PROFILER_STARTUP, not MOZ_PROFILES_STARTUP.

Thanks Florian. I am now trying to run the profiler from Firefox. I'll get back to you guys.

Hi again. The startup process was taking more than 25 minutes. Today I managed to start the upload process to profiler.firefox.com but the tab crashed. I guess the file was too big.

Then I did a regular system update (apt upgrade) and since then Firefox has been snappy and I can't replicate the problem. I will follow up if I see an issue, but for now the startup time seems normal.

Flags: needinfo?(dtownsend)

Came back after a reset. Here is the profile file from the Firefox addon. Hope it helps.

https://share.firefox.dev/497Ycwe

PS: I will erase the programme and install it again.

Flags: needinfo?(dtownsend)

(In reply to martin from comment #22)

Came back after a reset. Here is the profile file from the Firefox addon. Hope it helps.

https://share.firefox.dev/497Ycwe

Thanks for the profile! Loading pages is blocked until the local storage initialization finishes in the web extension process, so this looks like it will be fixed by the work currently happening in bug 1671932.

Depends on: 1671932
Flags: needinfo?(dtownsend)

The severity field is not set for this bug.
:mossop, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(dtownsend)
Severity: -- → S2
Flags: needinfo?(dtownsend)
Duplicate of this bug: 1910439
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: