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

New Releases: EasyOS 2.5.1 and NuTyX 12-rc3

  • Easy Buster version 2.5.1

    EasyOS versions 1.x are the "Pyro" series, the latest is 1.3. Easy Pyro is built with packages compiled from source using 'oe-qky-src', a fork of OpenEmbedded. Consequently, the builds are small and streamlined and integrated. The Pyro series may have future releases, but it is considered to be in maintenance status. The "Buster" series start from version 2.0, and are intended to be where most of the action is, ongoing. Version 2.0 was really a beta-quality build, to allow the testers to report back. The first official release was 2.1. The main feature of Easy Buster is that it is built from Debian 10 Buster DEBs, using WoofQ (a fork of Woof2: Woof-CE is another fork, used to build Puppy Linux).

  • EasyOS 2.5.1
  • EasyPup 2.5 boots, 2.5.1 kernel panic

    Rodney has been reporting this for sometime, that he gets a kernel panic trying to boot recent releases of EasyOS or EasyPup. They are using a 5.4.x kernel, except for EasyPup 2.5, I used a 4.19.157 kernel, and that booted. He tried to upgrade to 2.5.1, got kernel panic. So, he is back on 2.5.

  • NuTyX 12-rc3 available

    I'm very please to announce the new NuTyX 12-rc3 testing release. The 64-bit version is a complete new project. They are no plan to release a version 12 of NuTyX in 32 bits.

Devices/Embedded: Raspberry Pi, Jetson Nano and STMicroelectronics/FreeRTOS

  • World’s first fingerprint sensor HAT uses capacitive scanning

    SB Components has won Kickstarter funding for a $60 “PiFinger” HAT for the Raspberry Pi featuring a 2D capacitive fingerprint sensor with 176 x 176 resolution that can detect, compare and register up to 24 fingerprints. UK-based SB Components, which has delivered ambitious, Raspberry Pi based products such as its PiTalk phone, LapPi laptop, and PiArm robotic arm, has weighed in with what it calls the world’s first fingerprint sensor HAT. The open source, $60 PiFinger has won Kickstarter funding and will ship in February.

  • 5 Best Raspberry Pi Alternatives to Run Linux On – buying guide [Ed: This list itself might be OK, but all the links are referrer spam and should be disregarded]
  • Spread the joy of learning through making
  • Designing the Raspberry Pi Case Fan
  • Compact Jetson Xavier NX/ Nano open hardware baseboard supports Android

    When it comes to NVIDIA Jetson family of modules, we should understand that NVIDIA Jetson Nano is for makers and STEM education, while Xavier NX is more geared towards professional and commercial use. The compute module Xavier NX was announced before the development kit, which includes the module and reference carrier board and otherwise for NVIDIA Jetson Nano. There are some third-party carrier boards & edge computers available for Jetson Xavier NX and Jetson Nano, including DesignCore Carrier Board and Diamond FLOYD Carrier Board. Antmicro, a custom hardware, software, and AI engineering company, came up with a compact open hardware device: Jetson Nano/ Xavier NX baseboard. It supports both NVIDIA Jetson Nano SoM as well as the Xavier NX SoM.

  • ST adds FreeRTOS thread-aware debug for microcontrollers

    STMicroelectronics has added support for FreeRTOS thread-aware debug to its STM32CubeIDE development environment, completing its acquisition of the Atollic tools. ST has completed transferring major advanced features of Atollic TrueStudio for STM32 into STM32CubeIDE after acquiring Atollic in 2017. STM32CubeIDE with support for thread-aware debug of the open source FreeRTOS real time operating system further extends the tool’s features. FreeRTOS is now supported by Amazon as AmazonFreeRTOS for the AWS cloud service. The direct access to STM32CubeMX configuration functions simplifies project setup, selecting a target microcontroller from the complete STM32 portfolio, configuring GPIOs, clock tree, peripherals, and pin assignments. The tool allows developers to quickly analyse power consumption depending on the applications usage, as well as select middleware stacks and generate initialization code for the desired configuration.

Open Hardware: Arduino and 64-bit RISC-V

  • Arduino Blog » RobotSculptor uses a six-axis robot arm to sculpt clay models

    Robotic fabrication techniques such as 3D printing enable you to make a copy of a wide variety of items. Actually sculpting something out of clay, however, remains a largely human pursuit. One might also miss the individual style of a sculptor in a finished product. RobotSculptor, developed by a team of engineers from ETH Zurich and Disney Research, attempts to address both challenges. The system generates toolpaths from a base mesh design and allows artistic input via mouse strokes during the process. A six-axis robot arm then incrementally removes clay from the model-in-progress, using a custom loop tool.

  • 64-bit RISC-V core claims 10x better CoreMarks/Watt compared to other 3-5GHz CPUs

    Micro Magic unveiled an up to 64-bit RISC-V core showing a groundbreaking 110,000 CoreMarks/Watt, with a 3GHz chip consuming less than 70mW. The company claims 10 times better CoreMarks/Watt compared to other processors in the 3-5GHz range. Considering the spectacular promise and sudden demise of AI tech firm Magic AI, we should perhaps be wary of hyped up companies with Magic in their name. Yet, the astonishing claims about an incredibly efficient RISC-V core coming out of Sunnyvale, Calif. based EDA firm Micro Magic in recent weeks appear to be for real.

  • Arduino Blog » A (very) short guide to help you transition to the Arduino Science Journal

    Arduino acquired the Science Journal app from Google on August 5th, and the final handover takes place on December 11th, 2020. From that date, the Science Journal will no longer be supported by Google. If you haven’t exported your experiments and imported them into the Arduino Science Journal, we strongly encourage you to do so now, as your data will no longer sync with Google Science Journal after that date. [...] While we can’t disclose too much about our future plans for the app, we can tell you that we’ll ensure it will offer easy access to a stream of data that leverages your smartphone sensors, as well as Arduino sensors. The aim is to help learners understand the importance of an inquiry-based educational method rather than passive consumption of information. We’ll also continuously improve the accessibility of the app for all users, and find new ways of experimenting with science. In the near future, we’ll be interacting more with users, so you’ll hear more from us soon! We’ll also be adding more tutorials on our platform dedicated to Science Journal!

Mozilla: WebThings Gateway 1.0, Lobbying and Rust

  • Flying the Nest: WebThings Gateway 1.0 - Mozilla Hacks - the Web developer blog

    After four years of incubation at Mozilla, we are excited to announce the release of WebThings Gateway 1.0 and a new home for the WebThings platform.

  • Mozilla reacts to publication of the EU Democracy Action Plan - Open Policy & Advocacy

    The European Commission has just published its new EU Democracy Action Plan (EDAP). This is an important step forward in the efforts to better protect democracy in the digital age, and we’re happy to see the Commission take onboard many of our recommendations. [...] As a founding signatory to the EU Code of Practice on Disinformation we are encouraged that the Commission has adopted many of our recommendations for how the Code can be enhanced, particularly with respect to its implementation and its role within a more general EU policy approach to platform responsibility.

  • This Week in Rust 367
  • Philip Chimento: Advent of Rust

    I have a bit of time off and I decided to participate in Advent of Code 2020 after my coworker Adrián shared a link to it. I’ve heard that people use challenges like these as an excuse to learn a new programming language, and I have wanted to learn Rust for quite a long time now. Why Rust? From what I’ve heard, it’s a programming language oriented towards high performance and systems programming, like C or C++; but unlike those languages, it was designed in such a way to make it difficult or impossible to make mistakes such as buffer overflows or memory leaks. I have heard that it’s a lot more enjoyable to use than C++ as well. I did write a “Hello World” program in Rust some time ago, and I have heard things about Rust from others, so I wouldn’t be coming to it completely fresh. Nonetheless, fresh enough that I decided that the experience of writing something from scratch, in a new programming language, was unusual enough for me that I would keep a log while I was doing it. So here is that log. It’s a bit stream-of-consciousness. I’ve edited it so that it consists of complete sentences instead of just notes, but I’ve left in the mistakes and dead ends. I made this mainly so that I can look back later when I’ve learned more, and see what mistakes I made.