Testing default snap apps against equivalent deb apps - slow start times

To mount, you have to unsquash it. That’s what takes time. A .snap is squashed package.
When you mount something, say an iso, it stays mounted until the computer is put off. When you reboot it is not there. But, when you with snaps, it is unsquashed and “mounted” and stays in full size in /snap, after you put the computer off and is there when you reboot the computer.

That said, with snapd installed, the everything was 10.2GB. The installed system including the home folder was 10.2GB. Purged snapd and the system is 9.3GB. Without a single snap app, the snapd had taken 0.8GB space.

I reinstalled snapd and found that the new install didn’t have some baggage from the last time. The core and another large folder had gone. Instead a large core18 is there. Reinstalled Chromium snap. Looked in /var/lib/snapd/snaps, the chromium_881.snap there is 168.6MB. The Chromium folder in /snap is 605.3MB (unsquashed and always mounted).

Ran,
$ snap run --trace-exec chromium

Importing existing chromium profile from /home/akoya/.config/chromium (version 77.0.3865.90)
Import done in 4.088 s
Gtk-Message: 22:35:10.662: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:35:10.725: Failed to load module "canberra-gtk-module"
[3238:3238:1011/223514.753620:ERROR:sandbox_linux.cc(369)] InitializeSandbox() called with multiple threads in process gpu-process.
[3238:3238:1011/223518.311265:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
Slowest 10 exec calls during snap run:
  1.060s /snap/snapd/4992/usr/lib/snapd/snap-confine
  1.126s /snap/chromium/881/usr/lib/x86_64-linux-gnu/glib-2.0/gio-querymodules
  1.818s /snap/chromium/881/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders
  0.809s /snap/chromium/881/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0
  5.117s /snap/chromium/881/bin/desktop-launch
  4.047s /bin/cp
  5.103s /snap/chromium/881/bin/chromium.launcher
  11.088s /proc/self/exe
  20.937s /snap/chromium/881/usr/lib/chromium-browser/chrome
  11.344s /proc/self/exe
Total time: 32.871s

Ah, by the way, I am writing from the Chromium web browser that was taken off the Chromium snap, which lives in the home folder and is 237.2 MB, much, much faster. Runs in a sandbox too.

real 0m5.980s
user 0m6.261s
sys 0m1.489s

It just takes more time for a snap to get itself going, permanently mounted or not.

Maybe, I am “fiddling” about, but there appears to be comments on this slowness of default snaps, for example in Distrowatch (comment #34) suggesting a disclaimer. Looks like some other people fiddle too.

Enough “fiddling” from my side. I am keeping (or reinstalling when needed) snapd to get at few apps I need, such as leafpad, which is not available in Ubuntu repos. Those are portable.

Enough fiddling. :slight_smile: