$ snap run --trace-exec chromium
Gtk-Message: 21:16:33.373: Failed to load module “canberra-gtk-module”
Gtk-Message: 21:16:33.463: Failed to load module “canberra-gtk-module”
[2727:2897:1008/211636.183693:ERROR:token_service_table.cc(140)] Failed to decrypt token for service AccountId-102562585832489293610
[2869:2869:1008/211637.607402:ERROR:sandbox_linux.cc(369)] InitializeSandbox() called with multiple threads in process gpu-process.
[2869:2869:1008/211641.021952:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: ← error from previous GL command
Slowest 10 exec calls during snap run:
0.593s snap-update-ns
1.130s /usr/lib/snapd/snap-confine
1.472s /snap/chromium/861/bin/desktop-launch
0.214s /usr/bin/dbus-send
0.235s /snap/chromium/861/bin/chromium.launcher
0.278s /usr/bin/dbus-send
0.361s /usr/bin/xdg-settings
20.135s /proc/self/exe
28.398s /snap/chromium/861/usr/lib/chromium-browser/chrome
20.416s /proc/self/exe
Total time: 31.631s
Didn’t uninstall Chromium snap, as all web browsers are self contained, but just brought the app folder out to Home.
~$ time ~/chromium-browser/chrome
[5072:5072:1008/212843.785778:ERROR:sandbox_linux.cc(369)] InitializeSandbox() called with multiple threads in process gpu-process.
[5072:5072:1008/212844.165025:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: ← error from previous GL command
###!!! [Parent][DispatchAsyncMessage] Error: PBackgroundIDBFactory::Msg_PBackgroundIDBFactoryRequestConstructor Value error: message was deserialized, but contained an illegal value
A user needs/thinks that an app would start immediately when the user clicks on it. The time to go for cup of tea, until an app starts had gone forever, or so I thought. The 21 year old Apt is still doing better than the newer technologies.
Regarding Chromium, I just put it in the home directory and created a desktop file and a symlink. A web browser is, anyway a self contained folder. Or, it can be put in /usr/lib and desktop file in /usr/share/applications to get an icon on the menu/panel. Can be done both ways, though.
again, feel free to post this on the snap forum where the people maintaining snap packages, the developers of snapd and the whole infrastructure read along …
posting it here wont go anywhere beyond becoming a whining thread, if you want to help improving the situation (which i assume you do, since you invested some time to collect the numbers above) the right place to post is in https://forum.snapcraft.io
Ubuntu comes with few default snap apps, and they are much slower than their corresponding debs. This is about Ubuntu and Ubuntu apps, not about snapcraft. I put in the testing results for reflection.
I’ve read the most interesting statement there “Starting with snaps is easy” by two MS employees. I can understand their keenness.
Maybe, I’d post the numbers at snapcraft forums too.
I think it’s fair to post here or the snapcraft forum. Given some of these are applications the Ubuntu Desktop team are responsible for. If there’s specific issues identified, then we should hunt down where the bugs are and fix them if we can. The problem with the “snap is slow” argument is that it’s not as clear cut as that. The stack of things happening when you snap run firefox has some differences from the stack run when you /usr/bin/firefox.
We have made some changes in various places, but there’s clearly still a problem, so thanks for bringing it up. We need to do more work to identify the specific parts that have bottlenecks and fix them, for sure.
I’m not dismissing the issue, merely pointing out it’s actually super complicated. There’s a lot of moving parts, with possible issues covering a number of skills and domains.
I understand it is complicated and hope you’d succeed in overcoming them. I checked the Firefox snap out of curiosity.
The interest is in Ubuntu, not other distros or systems. I don’t believe Archers using snaps, but these snaps may trouble other Ubuntu flavours, but it is still Ubuntu.
@popey
I never had a real reason to look at other distros with Gnome shell before. Earlier Ubuntu had a DE no one had.
Anyway, checking standalone apps, such as Chromium, that I took out of the Chromium snap in Fedora 31 beta. I just copied the whole folder chromium-browser there and ran,
$ time ~/chromium-browser/chrome
The result,
real 0m4.541s
user 0m3.058s
sys 0m1.146s
In Ubuntu it was,
real 0m5.087s
user 0m6.032s
sys 0m1.318s
Just took the folder and put in Fedora 31 Beta. That folder is ~1/3 of the size of the Chromium snap in terms of MBs (607.3 MB snap, to 237.2 MB) . Just as portable!
Fedora installs Chromium browser normally, and the strange thing is it started slower than the one I took there.
$ time chromium-browser
gave,
real 0m14.429s
user 0m12.534s
sys 0m2.190s
Note: Of course, I can take the whole folder /usr/lib64/chromium-browser and place it anywhere and click on the executive file, and Chromium would start, also placed in Ubuntu. That one is also quite portable.