Saving Network Traffic - Delta's Efforts to Reduce the Message Size
March 11, 2020 by compl4xx
In the last months, the Delta Chat developers put a lot of focus on saving traffic. The result: current Delta Chat mobile releases consume far less data now.
It’s easy to forget that many people still pay data plans by the GB - their data traffic is expensive, limited, and slow. For many people, it’s even a question of money; Internet traffic can be quite expensive. In such moments, this can be the critical difference: is an app usable at all, or does it use too much traffic?
Because so many people want to save on their data plan, free Wi-Fi became one of the main offerings of Cafés and Restaurants.
A few things which were changed to reduce our data traffic consumption:
- Delta now avoids downloading messages that it doesn’t display. This saves a lot of traffic through messages from blocked contacts, and huge attachments from ordinary emails.
- A nice side effect is that you have less slowdown when getting online with a busy inbox.
- We optimized the traffic on idle, when the app isn’t used. In 10 minutes, it used to consume 6 kB - this was reduced down to 107 bytes.
- We combined read-receipts into one message, when they are sent in the same moment. Before, there was an email for each read receipt.
We changed newly generated PGP Keys to the new ed25519 algorithm - those keys are a lot smaller. This is very important, as the keys are sent in every message at the moment.
On the left, my old RSA key; it doesn’t even fit on the screen. On the right, a new ed25519 key.
We wanted to go for this way earlier, but we had to avoid compability issues. Maybe you noticed that we didn’t update F-Droid versions for about six months; with all the old Delta versions around, we couldn’t introduce changes like this without risking compability.
Note that the current releases still generate RSA2048 keys by default, because the Delta Chat testing discovered an incompatibility which was fixed in the current releases. After the next Desktop release we should finally be able to switch to generating ed25519 keys by default.
The above already reduces Delta Chat’s traffic a lot. The developers are considering a few more ideas. If you are interested in the details, take a look at the save-traffic label in the core issue tracker.