missing a tightly integrated deb package without snap

Bug #1970989 reported by Jérôme Bouat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
New
Unknown
firefox (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

I installed the Jammy Jellyfish version. When I launch firefox, the delay between my click and the apparition of the window is very long compared to the behaviour of the previous versions of Ubuntu. The deb package is just pulling the firefox snap. Why did you decide this performance regression ?! I don't understand.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: firefox 1:1snap1-0ubuntu2
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: XFCE
Date: Fri Apr 29 21:27:26 2022
InstallationDate: Installed on 2022-04-24 (5 days ago)
InstallationMedia: Xubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
Snap.Changes: aucun changement trouvé
SourcePackage: firefox
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Jérôme Bouat (jeromebouat) wrote :

Steps to reproduce:

I installed the 22.04 long term support version of Ubuntu (Jammy Jellyfish). In this release the firefox deb package is an empty package which pulls the snap package.

Actual results:

When I launch firefox, the delay between my click on the apparition of the window is very long compared to the behaviour of the previous version of the distribution (Firefox as a deb package).

Expected results:

Could Mozilla officially maintain a tightly integrated package (i. e. deb package through a complementary apt repository which could be directly maintained by Mozilla) for the long term support release of Ubuntu ?

Revision history for this message
In , Release-mgmt-account-bot (release-mgmt-account-bot) wrote :

The [Bugbug](https://github.com/mozilla/bugbug/) bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Revision history for this message
In , Emilio (emiliocobos) wrote :

Guess this is a dupe of bug 443422. Using the regular Mozilla builds should be straight-forward though. A deb package shouldn't be much more than untarring that and adding a `.desktop` file.

*** This bug has been marked as a duplicate of bug 443422 ***

Revision history for this message
Jérôme Bouat (jeromebouat) wrote :
Changed in firefox (Ubuntu):
status: New → Invalid
Revision history for this message
In , Jérôme Bouat (jeromebouat) wrote :

This bug isn't a duplicate of bug 443422. The bug 443422 is requesting a debug deb package ("provide debian dbg packages") with the debugging symbols of the Firefox software. I'm just requesting the regular main deb package for the Firefox software.
Could you please make the status back to unconfirmed ?

Revision history for this message
In , Jérôme Bouat (jeromebouat) wrote :

The Ubuntu support tells that Mozilla provides directly a snap and thus that this software isn't integrated any more by the Ubuntu team :
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1970989

The packages repository show that this is a new choice of Ubuntu since Ubuntu release Jammy Jellyfish (22.04 long term support) :
https://packages.ubuntu.com/search?keywords=firefox&searchon=names&suite=all&section=all

With the new 22.04 version of Ubuntu, I experience very long start-up compared to the previous long term support release. This could make Firefox less competitive compared to other web browsers which would benefit from a deb package.

The startup is very slow especially for the first startup of a snap machinery since the computer startup. The user may wonder if Firefox is buggy or if it became a bloatware. Moreover, this make Firefox less energy efficient with an increasing cpu and I/O usage (laptop battery operated, responsible behaviour towards the environment). Note that the total system memory consumption increases too.

Revision history for this message
In , Olivier Tilloy (osomon) wrote :

The increased startup time is [a known issue](https://forum.snapcraft.io/t/slow-cold-start-of-snap-firefox-on-ubuntu-21-10/27052), although it seems to be hard to nail down because observations are inconsistent from one user/machine to the next. But it is definitely something that needs to be addressed.

It would be helpful if you could quantify this "very long startup time" in your specific case, and share details about your hardware.

It would also be helpful if you could test the snap in the candidate channel (to be promoted to stable tomorrow when Firefox 100.0 is released) and let us know whether you're seeing a significant difference in startup time (bonus points for comparative measurements):

    sudo snap refresh firefox --candidate

Can you elaborate on the increased CPU, I/O, memory and energy consumption you're seeing? This is definitely not expected.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Thank you for taking the time to report this bug and help make Ubuntu better. Firefox is provided by a snap published by Mozilla, and they may not be aware of this issue. Please contact them via https://support.mozilla.org/kb/file-bug-report-or-feature-request-mozilla and link the bug report here so it can be further tracked. Thank you!

Changed in firefox (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Jérôme Bouat (jeromebouat) wrote :
Olivier Tilloy (osomon)
Changed in firefox (Ubuntu):
status: Incomplete → New
Changed in firefox:
status: Unknown → New
Revision history for this message
In , Jérôme Bouat (jeromebouat) wrote :

Below is the test I performed in a Qemu virtual environment.
Host : a Debian host.
Guest : Debian bookworm x86_64, LXQT, deinstalled preload and firefox-esr for light desktop.

On the guest I installed 2 flavours of the same 100.0 version of Firefox on :
- the snap : 100.0-2 (snap revision 1300) with the other required snaps (gnome-3-38-2004 0+git.1f9014a rev 99, gtk-common-themes 0.1-59-g7bca6ae rev 1519, core20 20220329 rev 1434)
- the deb package by hand from sid repository : 100.0-1.

Before starting the test, I started for the first time each flavour and I made the new page empty (no web search, no shortcut or recent activity).

I performed the below sequence with each flavour :
0. The host is up to date from the day (snap refresh, apt update), no background task expected, no other application on host and guest desktops.
1. I start AQemu.
2. I launch the virtual machine with Debian bookworm.
3. I login into the guest desktop environment.
4. I wait for roughly 60 s (stopwatch in hand).
5. I launch Firefox by the desktop menu entry and measure the start-up duration until the window appears.
6. I close Firefox and wait roughly 30s (stopwatch in hand).
7. I launch Firefox again and measure.
8. I close Firefox and wait roughly 30s (stopwatch in hand).
9. I launch Firefox again and measure.

In the case of the deb package application :
5. gives 2.5 s
7. gives 1.7 s
9. gives 1,6 s

In the case of the snap package application :
5. gives 5.9 s
7. gives 4.1 s
9. gives 4.3 s

Jeremy Bícha (jbicha)
Changed in firefox (Ubuntu):
status: New → Opinion
Revision history for this message
In , Jérôme Bouat (jeromebouat) wrote :

I'm describing below an other test with the same physical host and virtual guest.
I installed the xfce desktop environment (via tasksel) and I uninstalled all lxqt packages. I disabled the snap user service start (from the xfce session configuration panel).
Then, the cold start of the deb package application is down in less than 2 seconds (better). Maybe de xfce desktop environment already loaded a few libraries (libgtk-3-0, ...).
In addition, I measured the used memory (free -k) by comparing the "used" memory field before launch and a few seconds after the window appeared.
With deb package application : 266 MB.
With snap package application : 397 MB (+49%).
It seems the deb package application saves memory because it is sharing the libraries with the other applications of the desktop.
Note that I didn't count the used memory by the snap machinery (in case you wouldn't install snapd with a deb package application).

Revision history for this message
In , Jérôme Bouat (jeromebouat) wrote :

I performed an other test on an actual host :
- cpu Intel Core i5-2520M
- os Xubuntu 21.10 (impish)
- hard disk model ST9250320AS (5400 r/mn choosen because less noise)
- desktop : XFCE
- preload isn't installed

I installed one of the following flavours of Firefox at a time (I ensured the other flavour was desinstalled) :
- either the snap package for version 101.0-2
- or the deb package (from ubuntu repository) for version 100.0.2.

Before starting the test of a flavour, I started it for the first time and I made the new page empty (no web search, no shortcut or recent activity).

Below is the test :
1. The host is up to date from the day (snap refresh, apt update), I restart the computer.
2. I login into the guest desktop environment.
3. I wait for roughly 60 s (stopwatch in hand).
4. I launch Firefox by the desktop menu entry and measure the start-up duration until the window appears.
5. I close Firefox and wait roughly 30s (stopwatch in hand).
6. I launch Firefox again and measure.
7. I close Firefox and wait roughly 30s (stopwatch in hand).
8. I launch Firefox again and measure.

In case of the deb package application :
4. gives 21 s
6. gives 3 s
8. gives 3 s

In the case of the snap package application :
4. gives 27 s
6. gives 4 s
8. gives 4 s

As a conclusion for this specific hardware and those software versions, the snap flavour is roughly 30% slower than deb package in both cold or warm start-up.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Jérôme, work has been done in the past few months to improve the general performance and in particular startup time of the firefox snap. See the following blog posts for details:

https://ubuntu.com/blog/how-are-we-improving-firefox-snap-performance-part-1
https://ubuntu.com/blog/how-are-we-improving-firefox-snap-performance-part-2
https://ubuntu.com/blog/improving-firefox-snap-performance-part-3

We are interesting in hearing how this translates in numbers for you.

Revision history for this message
In , Jérôme Bouat (jeromebouat) wrote :

There is a last reason for providing a deb package. On Ubuntu 22.04 I don't need the snap except for Firefox . However, the snap system slows down the startup of Ubuntu 22.04.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.