0

I've recently migrated to a much faster computer:

  • 13th Gen Intel(R) Core(TM) i7-1360P ("16 CPUs")
  • VGA compatible controller: Intel Corporation Raptor Lake-P [Iris Xe Graphics] (rev 04)
  • 32 GB RAM

From:

  • Intel(R) Core(TM) i5-7440HQ CPU @ 2.80GHz ("4 CPUs")
  • VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
  • 16 GB RAM

Unfortunately, Firefox executed from snap is now VERY slow (and I don't mean the startup).

Youtube videos loose more than 70% of frames (0% lost frames on the old computer), there is visible lag when browsing the sites.

Checking "Use hardware acceleration when available" in prefrences does not seem to have any effect on performance. Starting with a "clean profile" doesn't help.

Firefox executed from a binary downloaded from www.mozilla.org works normally: videos play smoothly, Firefox does not lag.

Does anyone have an idea how this can be debugged? I.e. why Firefox from snap behaves so much slower on a faster computer? Chromium (also from snap) works fine.

Using the following snap version on both old and new computer:

firefox 113.0.1-1 2667 latest/stable mozilla** -

1 Answers1

1

Since you've compared speed by installing Firefox directly from Mozilla's PPA, I'll outline how to make that improvement:

  • Uninstall the Snap version. In Terminal, enter

    sudo snap remove firefox

    Note that I've omitted removing the Firefox folder, since you might want to revert.

  • Add the Firefox repository by entering in Terminal

    sudo add-apt-repository ppa:mozillateam/ppa.

  • Prevent Snap from reinstalling its version (this step is not needed if you've completely removed snap and snapd packages, as I have). In Terminal, enter the following to open gedit to a new file:

    sudo gedit /etc/apt/preferences.d/mozillateamppa

    Enter the following three lines and save the file.

    Package: firefox*

    Pin: release o=LP-PPA-mozillateam

    Pin-Priority: 501

  • Now run the following two commands to install Firefox and update.

    sudo apt update

    sudo apt install firefox

For more information, see the Ubuntu Handbook site, which also shows how to revert to Snap, if you prefer.

On PC's I maintain, all snap apps have been removed, and then snap and snapd packages were uninstalled. This has the advantage of fetching Firefox, Thunderbird and other applications directly from the developers, rather than waiting for the Ubuntu team to vet the latest version. Regrettably, Ubuntu Snap apps may be many versions behind current releases, preventing the latest security patches from being installed. Another example is Snap p7Zip, built on 7-Zip v. 16, last I checked. Windows 7-Zip is at v. 21.07, and it works better under wine, and it is up-to-date.

Of course, the disadvantage of grabbing packages from the universe is that one loses the extra vetting done by Ubuntu. So far, I've had no issue, but your mileage may vary.

DrMoishe Pippik
  • 25,661
  • 4
  • 36
  • 54
  • Is there a recommended way to migrate the Firefox profile? I've tried copying ~/snap/firefox/common/.mozilla to ~/.mozilla - but then, non-snap Firefox does not seem to recognize it. – Tomasz Chmielewski May 23 '23 at 13:04
  • @TomaszChmielewski, it should work, if the (text) file* installs.ini* and *profiles.ini* in home/.mozilla/firefox/ have been modified to point to the correct location. – DrMoishe Pippik May 23 '23 at 15:33