Language Selection

English French German Italian Portuguese Spanish

Snap speed improvements with new compression algorithm!

Filed under
Ubuntu

Security and performance are often mutually exclusive concepts. A great user experience is one that manages to blend the two in a way that does not compromise on robust, solid foundations of security on one hand, and a fast, responsive software interaction on the other.

Snaps are self-contained applications, with layered security, and as a result, sometimes, they may have reduced perceived performance compared to those same applications offered via traditional Linux packaging mechanisms. We are well aware of this phenomenon, and we have invested significant effort and time in resolving any speed gaps, while keeping security in mind. Last year, we talked about improved snap startup times following fontconfig cache optimization. Now, we want to tell you about another major milestone – the use of a new compression algorithm for snaps offers 2-3x improvement in application startup times!

LZO and XZ algorithms

By default, snaps are packaged as a compressed, read-only squashfs filesystem using the XZ algorithm. This results in a high level of compression but consequently requires more processing power to uncompress and expand the filesystem for use. On the desktops, users may perceive this as a “slowness” – the time it takes for the application to launch. This is also far more noticeable on first launch only, before the application data is cached in memory. Subsequent launches are fast and typically, there’s little to no difference compared to traditionally packaged applications.

To improve startup times, we decided to test a different algorithm – LZO – which offers lesser compression, but needs less processing power to complete the action.

As a test case, we chose the Chromium browser (stable build, 85.X). We believe this is a highly representative case, for several reasons. One, the browser is a ubiquitous (and popular) application, with frequent usage, so any potential slowness is likely to be noticeable. Two, Chromium is a relatively large and complex application. Three, it is not part of any specific Linux desktop environment, which makes the testing independent and accurate.

For comparison, the XZ-compressed snap weighs ~150 MB, whereas the one using the LZO compression is ~250 MB in size.

Read more

Canonical's Snap Packaging Switching To LZO Compression...

  • Canonical's Snap Packaging Switching To LZO Compression For Faster Startup Times

    The Snap packaging / software deployment effort led by Canonical for Ubuntu and other distributions currently relies on XZ compression of the SquashFS-based archives while moving forward they are planning to make use of LZO compression. Snap'ing with LZO will result in faster startup-times at the cost of larger packages.

    LZO offers less compression abilities than XZ but has the benefit of being less taxing during decompression and thus faster. The Chromium browser Snap package, for example, is ~150MB with XZ compression but increases to ~250MB with the LZO packaged version.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More in Tux Machines

13 Best Free and Open Source Python Microframeworks

One of the types of software that’s important for a web developer is the web framework. A framework “is a code library that makes a developer’s life easier when building reliable, scalable, and maintainable web applications” by providing reusable code or extensions for common operations. By saving development time, developers can concentrate on application logic rather than mundane elements. A web framework offers the developer a choice about how to solve a specific problem. By using a framework, a developer lets the framework control portions of their application. While it’s perfectly possible to code a web application without using a framework, it’s more practical to use one. Read more

Customize Task Switching Experience on GNOME Desktop With These Nifty Tools

Unless you’re new to Linux, you know that there are several popular desktop environment choices for users. And if you’re that newbie, I recommend you to learn what a desktop environment is along with this tutorial. Here, I shall be focusing on tweaking the task switching experience on GNOME. I know that the majority of users just tend to use it as is and stock settings are good enough for the most part. I mean there is nothing wrong with the application switcher that you use with Alt+Tab keyboard shortcut in Ubuntu. Read more

How to Install Arch Linux [Beginner's Guide]

This beginner's guide explains the steps on how to install Arch Linux - in a most easy and friendly way. Read more

Valve Backs Zink Work

  • Mike Blumenkrantz: Don’t Call It A Comeback

    I guess I never left, really, since I’ve been vicariously living the life of someone who still writes zink patches through reviewing and discussing some great community efforts that are ongoing. But now I’m back living that life of someone who writes zink patches. Valve has generously agreed to sponsor my work on graphics-related projects. For the time being, that work happens to be zink.

  • Valve Now Funding Blumenkrantz - Zink OpenGL-On-Vulkan To Continue

    Longtime open-source developer Mike Blumenkrantz who has been an Enlightenment developer for many years and was working for Samsung's Open-Source Group prior to its demise jumped into the open-source Linux graphics world this year. While being unemployed he began hacking on the Zink Gallium3D code that allows generic OpenGL acceleration over the Vulkan API. He quickly got the code to the point of OpenGL 4.6 support and quite compelling performance compared to where Zink was at earlier this year. Now it turns out he will continue with his Linux graphics adventures thanks to funding from Valve. Mike Blumenkrantz shared today that Valve is going to be sponsoring his graphics-related work moving forward. At least for now, that Linux graphics work is still on the matter of Zink.