Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support reinstalling content snaps with --reinstall snap too #11

Open
anonymouse64 opened this issue Jul 13, 2020 · 1 comment
Open
Assignees
Labels
enhancement New feature or request large

Comments

@anonymouse64
Copy link
Contributor

anonymouse64 commented Jul 13, 2020

We should support detecting content interface connections from snaps and reinstall those as well, since those can slow down snaps as well due to decompression by the kernel. The logic would look basically like:

if slot.Snap != "system" {
    snapshotSnap(slot.Snap)
    removeSnap(slot.Snap)
    snapsToInstall = append(snapsToInstall,slot.Snap)
}
@anonymouse64 anonymouse64 changed the title support removing content snaps with --reinstall snap too support reinstalling content snaps with --reinstall snap too Jul 13, 2020
@anonymouse64 anonymouse64 self-assigned this Jul 15, 2020
@anonymouse64
Copy link
Contributor Author

There are a few warts here however,

  1. Any other snaps that the user of etrace is using on their system when we remove/reinstall the content snap will end up getting confused and could crash, etc. so we would want to warn the user if they have any such applications running, this requires some more work to identify the running snaps that are using a particular gnome library
  2. The re-connections of the snaps could take a long time to do this

I did analyze this however to see if switching the content snaps from XZ to LZO would help significantly (even though that speedup would only apply to the very first graphical snap that uses that particular content snap, all further snaps even on their cold cache startup would benefit from the first one "warming up" the cache for the content snap itself. I used this prepare script:

#!/bin/bash -e

snap remove gnome-3-28-1804
snap remove gtk-common-themes

# CHANNEL=stable/lzo
CHANNEL=stable

snap install --channel=$CHANNEL gnome-3-28-1804
snap install --channel=$CHANNEL gtk-common-themes

(this was with the stable/lzo channel of those snaps that Ken published / built for me)

with this command line option to etrace:

$ etrace exec --no-trace --repeat=10 --cold --silent --prepare-script=refresh-gnome-platform-snaps.sh 1password

The results were:

  • with xz compressed gnome snaps avg 14.05 seconds (10 runs) with std deviation of 0.40
  • with lzo compressed gnome snaps avg 13.60 seconds (10 runs) with std deviation of 0.56

@anonymouse64 anonymouse64 added enhancement New feature or request large labels Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request large
Projects
None yet
Development

No branches or pull requests

1 participant