So, I just ran this for “mumble”. It appears Jack is part of the problem. The first 5 seconds are pretty much spent messing with Jack (Further down below is the spotify output):
~$ etrace exec --use-snap-run --discard-snap-ns mumble
2020/06/15 18:41:32 xdotool.go:84:
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
exec of JACK server (command = "/usr/bin/jackd") failed: No such file or directory
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
<W>2020-06-15 18:41:38.891 JackAudioSystem: unable to open client due to 2 errors:
<W>2020-06-15 18:41:38.892 JackAudioSystem: JackFailure - overall operation failed
<W>2020-06-15 18:41:38.892 JackAudioSystem: JackServerFailed - unable to connect to the JACK server
<W>2020-06-15 18:41:39.911 G15LCDEngineUnix: Unable to connect to G15Daemon.
<D>2020-06-15 18:41:39.913 libopus 1.2.1 from /snap/mumble/1141/bin/libopus.so.0
<W>2020-06-15 18:41:39.916 CELT bitstream 8000000b from /snap/mumble/1141/bin/libcelt0.so.0.7.0
<W>2020-06-15 18:41:39.917 CELT bitstream 80000010 from /snap/mumble/1141/bin/libcelt0.so.0.11.0
<W>2020-06-15 18:41:39.921 Theme: "Mumble"
<W>2020-06-15 18:41:39.921 Style: "Dark"
<W>2020-06-15 18:41:39.922 --> qss: ":themes/Mumble/Dark.qss"
<W>2020-06-15 18:41:39.923 Locale is "en_GB" (System: "en_GB")
<W>2020-06-15 18:41:39.959 propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.98\" (uid=1000 pid=4456 comm=\"/snap/mumble/1141/bin/mumble \" label=\"snap.mumble.mumble (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=929 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
<W>2020-06-15 18:41:39.960 nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.98\" (uid=1000 pid=4456 comm=\"/snap/mumble/1141/bin/mumble \" label=\"snap.mumble.mumble (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=929 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
<W>2020-06-15 18:41:39.967 "Object path cannot be empty"
<W>2020-06-15 18:41:40.027 Database SQLite: "3.22.0"
<W>2020-06-15 18:41:40.030 Overlay: Listening on "/run/user/1000/snap.mumble/MumbleOverlayPipe"
<W>2020-06-15 18:41:40.035 Updating application palette
<W>2020-06-15 18:41:40.053 GlobalShortcutX: Using XI2 2.3
Mumble Link plugin: error creating shared memory
<W>2020-06-15 18:41:40.457 AudioInput: Opus encoder set for VOIP
<W>2020-06-15 18:41:40.457 AudioInput: 96000 bits/s, 48000 hz, 480 sample
<W>2020-06-15 18:41:40.457 PulseAudio: Starting input alsa_input.usb-SteelSeries_SteelSeries_Siberia_800-00.mono-fallback
<W>2020-06-15 18:41:40.457 PulseAudio: Starting output: alsa_output.usb-SteelSeries_SteelSeries_Siberia_800-00.analog-stereo
<W>2020-06-15 18:41:40.461 AudioOutput: Initialized 1 channel 44100 hz mixer
<W>2020-06-15 18:41:40.468 AudioInput: Initialized mixer for 1 channel 44100 hz mic and 0 channel 48000 hz echo
warning: The VAD has been replaced by a hack pending a complete rewrite
<W>2020-06-15 18:41:40.535 Database SQLite: "3.22.0"
<W>2020-06-15 18:41:40.535 OpenSSL Support: 1 (OpenSSL 1.1.1 11 Sep 2018)
<W>2020-06-15 18:41:40.618 ServerHandler: TLS cipher preference is "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA"
<W>2020-06-15 18:41:40.702 OSInfo: Failed to execute lsb_release
<W>2020-06-15 18:41:40.711 TextToSpeech: Failed to contact speech dispatcher.
<W>2020-06-15 18:41:42.869 PulseAudio: Forcibly disconnected from PulseAudio
50 exec calls during snap run:
Start Stop Elapsed Exec
0 175022 175.02284ms /usr/bin/snap
12426 21911 9.485006ms /sbin/apparmor_parser
37679 42958 5.279064ms /snap/core/9289/usr/lib/snapd/snap-seccomp
51333 52506 1.173019ms /usr/lib/snapd/snap-device-helper
53202 54481 1.279115ms /usr/lib/snapd/snap-device-helper
55489 56597 1.108884ms /usr/lib/snapd/snap-device-helper
57446 58671 1.225948ms /usr/lib/snapd/snap-device-helper
59329 60546 1.216888ms /usr/lib/snapd/snap-device-helper
61367 62512 1.145839ms /usr/lib/snapd/snap-device-helper
63210 64295 1.085042ms /usr/lib/snapd/snap-device-helper
64931 66128 1.197099ms /usr/lib/snapd/snap-device-helper
66359 67631 1.271963ms /usr/lib/snapd/snap-device-helper
68062 69177 1.115798ms /usr/lib/snapd/snap-device-helper
69381 70531 1.149892ms /usr/lib/snapd/snap-device-helper
70747 71896 1.148223ms /usr/lib/snapd/snap-device-helper
72125 73143 1.017093ms /usr/lib/snapd/snap-device-helper
73504 74830 1.32513ms /usr/lib/snapd/snap-device-helper
75095 76180 1.085042ms /usr/lib/snapd/snap-device-helper
76442 77741 1.299858ms /usr/lib/snapd/snap-device-helper
78026 79074 1.048803ms /usr/lib/snapd/snap-device-helper
79299 80471 1.171112ms /usr/lib/snapd/snap-device-helper
80801 81800 998.973µs /usr/lib/snapd/snap-device-helper
81994 83210 1.216888ms /usr/lib/snapd/snap-device-helper
83423 84774 1.350164ms /usr/lib/snapd/snap-device-helper
84990 86022 1.032829ms /usr/lib/snapd/snap-device-helper
86799 88173 1.374006ms /usr/lib/snapd/snap-device-helper
88953 90007 1.053094ms /usr/lib/snapd/snap-device-helper
152071 160794 8.723974ms snap-update-ns
167659 173197 5.537986ms snap-update-ns
175022 180223 5.201101ms /usr/lib/snapd/snap-exec
180223 294759 114.535093ms /snap/mumble/1141/bin/desktop-launch
185338 187860 2.521991ms /bin/date
202138 204674 2.536058ms /usr/bin/md5sum
205821 208400 2.57802ms /bin/cat
209475 213327 3.85189ms /bin/grep
229774 233689 3.914117ms /usr/bin/head
235225 238932 3.706932ms /usr/bin/head
240350 243963 3.612995ms /usr/bin/head
245653 249603 3.950119ms /usr/bin/head
251199 255003 3.803968ms /usr/bin/head
256641 260289 3.648042ms /usr/bin/head
261900 265924 4.024028ms /usr/bin/head
267593 271159 3.566026ms /usr/bin/head
272537 276211 3.673076ms /usr/bin/head
279445 283843 4.398107ms /bin/ln
285743 289454 3.710985ms /bin/rm
289957 293707 3.750801ms /bin/ln
294759 10415644 10.120885848s /snap/mumble/1141/bin/mumble
367547 377722 10.175943ms /bin/sh
370594 377614 7.02095ms /snap/mumble/1141/usr/bin/jackd
Total time: 10.415644884s
Total startup time: 10.422044663s
As for spotify, this seems to be slow for other reasons:
~$ etrace exec --use-snap-run --discard-snap-ns spotify
2020/06/15 18:44:16 xdotool.go:84:
ln: failed to create symbolic link '/home/marcel/snap/spotify/41/.config/gtk-2.0/gtkfilechooser.ini': File exists
Gtk-Message: 18:44:23.273: Failed to load module "appmenu-gtk-module"
Gtk-Message: 18:44:23.274: Failed to load module "gail"
Gtk-Message: 18:44:23.275: Failed to load module "atk-bridge"
92 exec calls during snap run:
Start Stop Elapsed Exec
0 174102 174.102067ms /usr/bin/snap
12651 22262 9.610176ms /sbin/apparmor_parser
37942 42951 5.00822ms /snap/core/9289/usr/lib/snapd/snap-seccomp
51259 52342 1.08385ms /usr/lib/snapd/snap-device-helper
53005 54058 1.052141ms /usr/lib/snapd/snap-device-helper
54713 55875 1.161098ms /usr/lib/snapd/snap-device-helper
56535 57563 1.027107ms /usr/lib/snapd/snap-device-helper
58163 59204 1.04022ms /usr/lib/snapd/snap-device-helper
59834 60929 1.094102ms /usr/lib/snapd/snap-device-helper
61588 62706 1.118898ms /usr/lib/snapd/snap-device-helper
63360 64449 1.088142ms /usr/lib/snapd/snap-device-helper
64744 65864 1.119136ms /usr/lib/snapd/snap-device-helper
66112 67156 1.044034ms /usr/lib/snapd/snap-device-helper
67359 68502 1.142978ms /usr/lib/snapd/snap-device-helper
68700 69843 1.142978ms /usr/lib/snapd/snap-device-helper
70391 71547 1.155138ms /usr/lib/snapd/snap-device-helper
71784 72838 1.054048ms /usr/lib/snapd/snap-device-helper
73096 74139 1.043081ms /usr/lib/snapd/snap-device-helper
74341 75474 1.133918ms /usr/lib/snapd/snap-device-helper
75701 76731 1.029968ms /usr/lib/snapd/snap-device-helper
76931 78052 1.121997ms /usr/lib/snapd/snap-device-helper
78556 79632 1.075983ms /usr/lib/snapd/snap-device-helper
79808 80948 1.139163ms /usr/lib/snapd/snap-device-helper
81217 82319 1.10197ms /usr/lib/snapd/snap-device-helper
82490 83714 1.223087ms /usr/lib/snapd/snap-device-helper
84295 85402 1.106977ms /usr/lib/snapd/snap-device-helper
86165 87352 1.187086ms /usr/lib/snapd/snap-device-helper
152667 160288 7.621049ms snap-update-ns
166029 172028 5.998134ms snap-update-ns
174102 179137 5.035877ms /usr/lib/snapd/snap-exec
179137 5671209 5.492071151s /snap/spotify/41/bin/desktop-launch
185789 188496 2.707004ms /bin/date
195873 199928 4.054069ms /usr/bin/getent
202076 204406 2.330064ms /usr/bin/md5sum
205688 208242 2.553939ms /bin/cat
209290 212965 3.675937ms /bin/grep
215591 224358 8.766174ms /bin/mkdir
240860 262720 21.859169ms /usr/bin/head
264410 270267 5.85699ms /usr/bin/head
272068 277879 5.810022ms /usr/bin/head
279639 285048 5.409002ms /usr/bin/head
286627 292179 5.552053ms /usr/bin/head
293629 298964 5.335092ms /usr/bin/head
300668 306063 5.395889ms /usr/bin/head
307635 312993 5.35798ms /usr/bin/head
314780 320143 5.362987ms /usr/bin/head
321856 327193 5.337953ms /usr/bin/head
329495 335098 5.603075ms /snap/spotify/41/usr/bin/xdg-user-dirs-update
352018 359136 7.117986ms /usr/bin/realpath
360234 365714 5.479097ms /usr/bin/realpath
366858 372311 5.452156ms /usr/bin/realpath
373254 378484 5.230903ms /usr/bin/realpath
379653 384924 5.270957ms /usr/bin/realpath
385993 391294 5.300045ms /usr/bin/realpath
392309 397923 5.614042ms /usr/bin/realpath
399233 404803 5.570888ms /usr/bin/realpath
407697 413328 5.63097ms /bin/rm
420917 426817 5.900859ms /bin/ln
427304 460036 32.732009ms /bin/rm
462388 506103 43.714046ms /bin/cp
508063 518148 10.085821ms /bin/mkdir
519056 528064 9.008884ms /bin/mkdir
528132 534847 6.714105ms /bin/rm
532999 541120 8.121013ms /bin/ln
535909 543509 7.600069ms /bin/rm
544118 553917 9.799003ms /bin/mkdir
546875 555362 8.486986ms /bin/ls
557388 565340 7.952928ms /bin/ls
559262 567610 8.347034ms /usr/bin/dirname
567229 576165 8.935928ms /bin/ls
568022 574532 6.510972ms /bin/ln
575234 585290 10.056018ms /bin/rm
592686 603260 10.573148ms /bin/ln
597265 610922 13.656139ms /bin/ls
627091 635545 8.45313ms /bin/mkdir
627363 635390 8.027076ms /bin/ls
637008 645200 8.192062ms /bin/ls
647258 657207 9.949922ms /bin/ls
659082 667272 8.189201ms /bin/ls
670195 678529 8.333921ms /bin/ls
680356 688157 7.801055ms /bin/ls
689821 697606 7.784128ms /bin/ls
699542 712222 12.680053ms /bin/ls
713849 721822 7.972955ms /bin/ls
724469 736743 12.274026ms /bin/ls
738359 746953 8.593082ms /bin/ls
748842 756809 7.966995ms /bin/ls
758390 766607 8.216142ms /bin/ls
768636 776803 8.166074ms /bin/ls
777431 803308 25.877952ms /snap/spotify/41/usr/lib/x86_64-linux-gnu/glib-2.0/glib-compile-schemas
5671209 13490458 7.819248914s /snap/spotify/41/usr/share/spotify/spotify
8790257 13472625 4.682367086s /proc/self/exe
Total time: 13.510096074s
Total startup time: 13.516399578s