Google announced today that it has implemented a new updating method called file-by-file patching that reduces the size of app updates on Android by 65% on average.

The company started to use the bsdiff algorithm earlier this year to reduce the size of application updates by 47% on average when compared to the full size of the Android app.

The new file-by-file patching method that google announced today improves that to 65% on average, and in some cases up to 90%.

Google Play sends the device a patch that describes the difference between the old and new version of the application when file-by-file patching is used.

File-by-file patching

File-by-file patching uses the following process to update an application on an Android device:

Google decompresses both the old and new file to compute the delta using bsdiff. The patch is applied in the next step by decompressing the old file, applying the delta (the differences), and compressing the resulting data to a new file. Google then makes sure that the new file is identical to the file the developer uploaded to the Play Store originally.

Google ran some benchmark tests comparing the old and new file patching method against each other. The result was that file-by-file patching reduced the size of the patch significantly when compared to the bsdiff method.

Netflix topped the list with a 92% size reduction of the patch to 1.2 Megabyte over the original size of 16.2 Megabyte. Patch sizes dropped between 32% and 92% of the original application size, while it dropped only between 9% and 81% using the bsdiff method.

As you may have noticed already, there is a drawback to the method. Since files need to be decompressed and recompressed on the device, more processing power is needed during updates.

Google notes that the process takes about 1 second per Megabyte on 2015 or newer devices, and usually longer on older devices.

However, there is one trade off; extra processing power is needed on the device. On modern devices (e.g. from 2015), recompression can take a little over a second per megabyte and on older or less powerful devices it can be longer. Analysis so far shows that, on average, if the patch size is halved then the time spent applying the patch (which for File-by-File includes recompression) is doubled.

The company made the decision to limit the new patching method to automatic updates for the time being. These updates are run in the background and should not impact device performances too much therefore.

For now, we are limiting the use of this new patching technology to auto-updates only, i.e. the updates that take place in the background, usually at night when your phone is plugged into power and you're not likely to be using it. This ensures that users won't have to wait any longer than usual for an update to finish when manually updating an app.

A decrease in download size at the expense of longer update times on the device.

Now You: would you trade update size for time?

Summary Article Name Size of Android app updates reduced significantly Description Google announced today that it has implemented a new updating method called file-by-file patching that reduces the size of app updates on Android by 65% on average. Author Martin Brinkmann Publisher Ghacks Technology News Logo

Advertisement