I realize that most people aren’t overly concerned with OTP release sizes. I hadn’t been, but an issue came up where over-the-air updates over an LTE connection actually starts costing money. The OTP release on my device occupies about 55% of the space, not counting
beam.smp. I was looking at the application sizes in a release. Here’s a sampling of the top sizes (in KB) I’m seeing:
$ du -ks * | sort -rn 4652 elixir-1.7.4 4012 stdlib-3.6 1792 kernel-6.1 1736 compiler-7.2.7 1136 ssl-9.0.3 1028 asn1-5.0.7 912 public_key-1.6.3 900 mix-1.7.4 880 ssh-4.7.1 780 distillery-2.0.10 372 sasl-3.2.1 312 iex-1.7.4 308 runtime_tools-1.13.1 204 crypto-4.3.3 200 socket-0.3.13 184 x509-0.5.0-dev 148 nerves_network-0.3.7 144 logger-1.7.4 136 nerves_runtime-0.8.0 128 system_registry-0.8.0
I’ve configured Distillery to strip debug out of the
.beam files. That helped, but not as much as I hoped. As you can see, Elixir and stdlib are still over 4 MB and there are quite a few decent size ones after that. If those could be reduced, that would be a decent win for me. Has anyone tried doing this? Any ideas?