Unsquashfs vs mount during firstboot seeding

During a debug session where we created a bootchart for a customer device, we noticed a lot of unsquashfs calls during the firstboot seeding of snaps …

Each of these calls to the unsquashfs userspace tool consumes quite some CPU which can be harmful on singe-core/single-threaded embedded devices where your IO is more serialized.

I assume we do this to get access to snap.yaml to pull some metadata out of the snap … it would be nice if this function could instead simply temporary mount the snap file and cat/cp (with the go equivalent indeed) whatever data it wants to obtain, Leaving the squashfs handling to the kernel instead of using external userpace tools should improve the situation.

Note that this is indeed not significant on multi-core and multi-threaded SoCs and simply a suggestion to improve the general performance of our code.