-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Enable LZO compression for snap package #2609
Comments
Hi @pachulo, thank you for opening this request. I've done a little research and here's what I've found: Bitwarden currently does not build snaps directly via snapcraft, but instead leverages electron-builder. The only part of snapcraft that is used, is to upload the package to the snap store. From the electron-builder docs here, I currently can't find a way to pass on the "compression" option. As a refactoring of the snap build process (use snapcraft), would be very time intensive I suggest opening an issue/request with the electron-devs and also link to this issue. Hopefully they'll be able to implement it in a future version, and we'd just need to update the dependency and pass in the desired compression option. One thing that definitely needs to be considered by the Bitwarden team, is the increase package size using the LZO compression over XZ. |
Hi @pachulo, |
Hi! This will be solved once a stable version of electron-builder v23.x is released, as using the LZO algorithm will be the default then. |
OK, there's now a stable version of electron-builder v23: https://github.com/electron-userland/electron-builder/releases/tag/v23.2.0 |
Has this change been released yet? I'm running Bitwarden version 2022.9.0 and the cold launch speed is still rather slow. If the change hasn't been released yet, when can we expect for it to be available? |
@thatLeaflet: We haven't updated No info on an ETA at this time. |
This is the issue that needs to be solved: electron-userland/electron-builder#6621 |
Has the underlying issue been fixed? I can see that #6621 is still open, but it seems that electron-userland/electron-builder#7040 is reporting the same issue and has been fixed, but I could be misunderstanding it. |
Very good question @thatLeaflet , I guess is up to bitwarden developers (ping @djsmith85 ) to test it, but the thing is that versions of |
OK, it should be safe to use electron-builder 23.6.0 now, which should have this solved. |
The snap client is the only official one for Linux so this issue is affecting a lot of Linux Bitwarden users. With the electron-builder fixed, a fix for this issue seems like a very low hanging fruit, probably just change the "compression" property and test. I'd argue that the increased package size that @djsmith85 mentioned is a non-issue compared to the abysmal start times. |
@pachulo, @sebastian-brandt The bump to electron-builder 23.6.0 is currently in the works with #5038. |
@djsmith85 now that #5038 is merged, what else is left to do? |
It's been a few months since the last reply, so I'm bumping this. Hoping to see the better compression taken advantage of in the Bitwarden Snap! |
As of today, snap is still using the xz algorithm:
But I'm not really sure why, to be honest... 🤔 |
Describe the Bug
Snap packages are known for having a very long first startup time. That's mainly because snaps are compressed squashfs images using XZ algorithm. Recently Canonical made it possible to use LZO algorithm instead of XZ, which significantly improves startup time. I'd like to ask to enable LZO compression for Bitwarden desktop snap.
Expected Result
According to Canonical, the use of the LZO compression offers 40-74% cold startup improvements over the XZ compression.
https://forum.snapcraft.io/t/how-to-switch-your-snap-to-use-lzo-compression/21714
https://snapcraft.io/blog/snap-speed-improvements-with-new-compression-algorithm
Actual Result
It can take up to 4-5 seconds on my fairly modern desktop PC with SSD to launch Bitwarden snap for the first time. The subsequent launches are fast, but the first one is annoyingly slow. Using LZO algorithm should fix this issue (it did fix it in case of Chromium for me).
Environment
The text was updated successfully, but these errors were encountered: