Size Does Matter – Our journey towards a smaller apk

| by Aviv Laufer

One of the issues that are sometimes overlooked when developing a mobile app is the size of the application. Even in our age of fast mobile networks and devices with plenty of storage space users still consider the size of an app before installing it, and of course if you want your app to run on lower end devices or in places where the network is slow or pricy, then you must take into consideration the size of your application.
Not so long ago our app size was about 36 MB and we started to hear from users that it’s too big for them to download. So we put our head together and bit by bit we made our application smaller. The current size of our application is about 7.6 MB (about ⅕ from where we started). Just for comparison, the size of similar Video chat applications like Skype,ooVoo,Tango and Viber is between 15 to 22 MB so our app size is somewhere between half to a third of similar applications. In addition to user satisfaction, reducing the application size also gave a boost to the development process: now every compilation takes a few seconds less also copying time of the apk to the device is much smaller. This looks like a trivial change but it quickly adds up to saving a lot of development time.

So what was the magic behind such a reduction in the application size:
1. We went over all the app static assets and removed unused ones (assets that the app no longer used, or that were needed for outdated screen resolutions).
2. We further compressed our images.
3. We removed unnecessary native libraries (ones that were not longer used, or ones that compiled for CPU architectures that we were not supporting).
4. We are using proguard in order to remove unnecessary java code.
5. And here is the big one: we moved from openCV to renderscript. Up until recently we used openCV in order to apply realtime effects on video streams. Once we moved to renderscript we eliminated the use of the native arm and X86 libraries and the java jar file. We also gained a boost in our performance but this is another story.

This process was evolutionary and we made changes in each and every release (we tend to release a new version avery 3-4 weeks). Now when we add new features and functionality to our application we take into account their effect on the application size.

Category:

Have something to say?