Launching snap question

Hi :wave: I have a quick yes/no question: When launching a freshly installed snap, it takes a few seconds - afterwards it’s almost instant. I imagine that some kind of unpacking is going on at first launch. My question is, would it be possible to do this “unpacking” :man_shrugging: at the time of installation? I mean without the actual application launching on screen. No one would care if the installation took longer, so if this was possible, I think it would be a better user experience.


There’s already a change that essentially fixes this: use LZO compression.

Snaps are not like regular apps. They are actually mounted like disks when you start to use them. You’ll find /dev/loop/** devices when you run lsblk. The snaps when snapped, are compressed by the xz compression by default, which makes the size of the snap small, but takes more cpu-power to load, whereas now lzo compression is also coming up, which increases the size a little, but increases the startup speed, as the compression here is less.

BTW, welcome to community.

Thanks for the feedback :pray: I’m still puzzled, but maybe I can ask differently:

The first time you launch a snap, it is mounted and uncompressed. Would it be possible to do this at the time on installation (without launching the snap on screen), so the snap would launch faster the first time you’re actually starting it?

There’s already a change that essentially fixes this:

Well yes, but not for snaps already packaged, only for new ones.

BTW, welcome to community.

Thanks :blush:

Well the snaps are uncompressed and mounted when you’re starting the OS, you’ll find it if you go through your journalctl. But When launching the app, it needs to be copied your ram, that’s how an app is launched. This copy operation takes a little bit more time often cause the snaps are bundled with all its dependencies, desktop files, icons everything.