Hello All –
When executing snaps like
telegram (mostly anything I try), I noticed them taking longer to start up then I was used to. There are two major subdivisions when considering startup time.
- First startup (before the fs cache is hot)
- Subsequent startup (after the fs cache is hot)
I find that both seem noticeably slower than apps that have counterparts in the .deb world. I looked to narrow this down a bit and provide a concrete example for people to look at, so I am looking on a bionic machine, with an SSD. and found a package that does a lot of startup tasks in its help generation (openstack-cli / python3-openstackclient).
bionic python3-openstackclient: version 3.14
snap openstack-cli: version 3.11 (also python3)
Obviously this is not strictly apples to apples, but I wanted to show something people could repeat and play around with. I see similar differences in startup time across a wide variety of snaps, and all of them have similar complications when doing direct comparisons.
To setup, I did:
sudo apt install python3-openstackclient python3-oslo-log sudo snap install openstack-cli
My testing was basically run it a bunch of times. Rather than show you each iteration, here is the results of a representative run after a few attempts of each (warm cache case) to focus my question:
dpb@aries:~$ time /usr/bin/openstack --help > /dev/null real 0m1.183s user 0m1.136s sys 0m0.044s dpb@aries:~$ time /snap/bin/openstack-cli --help > /dev/null real 0m3.185s user 0m3.092s sys 0m0.092s
As you can see, there is about a 2-3x difference in what should be something roughly equivalent. Again, I see this difference on many apps, but it’s difficult to quantify how long chromium takes to launch, for instance. Sometimes the difference is more like 50% more, sometimes higher.
Is anyone else experiencing this? Is it an issue with my configuration? Apparmor, etc?
dpb@aries:~$ snap version