Skip to content

GCompris 2.4 Release: Improved Data Efficiency Conserves Network Bandwidth, Saves Energy

Wednesday, 13 April 2022 | Johnny Jazeix

GCompris is KDE’s educational software suite and currently includes around 170 activities for children aged from 2 to 10 years old. All these activities have big, bright and colorful images, designed to encourage children to have fun with the tasks.

Two months ago Karl, a GCompris contributor, asked if the images on our Erase activity could be updated to use higher-quality images.

GCompris releases version 2.4 – with a focus on data efficiency! (Image Source)

From the maintainer’s perspective, this was a difficult decision. Yes, we understand the value of good-quality images; however, due to constraints on Android, we cannot have packages above 100MB. And we were already close to the limit: the previous version for arm64 devices was already 91MB!

Erase: Screenshot of better quality images with a smaller size (Image Source)

In GCompris, much of the application space is used up by the images, and, until now, we have been using the most common formats, such as PNG and JPEG. So we decided to run some tests, and we found that, in the Paintings activity (which contains the biggest number of graphical assets) we could convert the PNG images to WebP without any loss in quality. The size, however, went from 9.1MB to 6.6MB! What’s more, it could be reduced even further down to 1.9MB if we used a quality of 90 converting with the ImageMagick tool!

Karl also did some tests on the JPEG images to see whether we could achieve acceptable quality, and then Timothée did the tremendous work of converting almost all of the files from PNG and JPEG to WebP.

Although a few images were kept in the original format (as there was no gain in converting them), we documented the conversion steps on our website and the following data shows the difference between versions 2.3 and 2.4, with the most significant change being the use of better quality, yet more data-efficient images:

For the external image dataset used in vocabulary activities, we went from 66MB to 41MB.

So overall we reduced the size of GCompris by between 25% to 30% (~27MB)!

Clickgame: Screenshot of better quality images with a smaller size (Image Source)

Apart from the reduction in size, the images load faster, even if this is not perceptible to the user. For the Paintings activity, which contains 269 images, a simple benchmark shows it takes ~157ms to load all WebP images (as QImage), whereas it took ~185ms when we were using PNG images.

This data efficiency means that we will be able to add more content without worrying about the size limitation. Even better, the reduction in package size means downloading it uses less bandwidth, and thus demands less energy from the network. A 2017 report from the French non-profit “The Shift Project” found that 16% of digital energy consumption is from network use. The changes in the 2.4 release may not make a dent in those worldwide numbers taken individually, but increased data efficiency can make a difference in the long run and when replicated over many applications.

GCompris is also used in many countries with poor Internet connections. Making digital tools – especially educational ones – more accessible by requiring less network bandwidth has benefits for us all!

Screenshot from “Lean ICT: Towards Digital Sobriety (Report Of The Working Group Directed By Hugues Ferreboeuf For The Think Tank The Shift Project –- March 2019)” (Source)

GCompris is one of the many FOSS apps that will be measured at KDE Eco’s measure-athon in our coming community lab at KDAB Berlin.

GCompris is available for download on multiple platforms such as Linux, Android, Windows, macOS, Raspberry Pi, and Ubuntu Touch.

Article contributed by under the CC-BY-SA-4.0 license.