192 karma · joined October 18, 2013
Yelp also has a large exports section for the main app binary, that's usually a sign of a problem because the main binary doesn't need to export any symbols, only frameworks do that.
Twitter has a handful of 4MB images, much bigger than images you'd expect in an app. I took a look at a few of these and they are just gradient background images that could have been drawn with something like core graphics to completely eliminate the need for an image.
Twitter: https://emergeassets.s3.us-west-1.amazonaws.com/Screen+Shot+...
Yelp: https://emergeassets.s3.us-west-1.amazonaws.com/Screen+Shot+...
App size can be measured in many ways like download size, install size, binary size, thinned size. I wrote about the most important ones here: https://docs.emergetools.com/docs/what-is-app-size
I'd like to see them open up this possibility in a controlled way one day. Something like a review process for feature modules that could be updated in a similar process to full apps.
We parse Obj-C and Swift runtime metadata to determine size contributions of individual types and functions in your app. We use this analysis to post PR comments with granular size diffs to help devs write smaller, better code.
I tried it out on the Uber app and immediately noticed a disproportionate impact from their code-gen dependency injection framework, Needle. The codegen is responsible for over 30k classes in the app binary, and contributes over 10mb! In general codegen is a common problem with Swift binary sizes, and the fewer reference types generated the better, it even helps with startup time!
We’ve written a blog post with case studies about how 7 of the most popular iOS apps could reduce their size: https://medium.com/swlh/how-7-ios-apps-could-save-you-500mb-...
In my experience working on large apps like Airbnb we try to get ahead of the problem even before approaching the cellular limit, since a smaller size helps acquire and keep users, and we want to avoid architecture decisions that would become a problem down the road.
It's not too rare for one of these low hanging fruit optimizations to be accidentally introduced in a large company, with testing on every PR you can catch them before they‘re introduced. Binary size is definitely what changes most often at these large companies and that's why our continuous monitoring lets developers know exactly the granular binary size affect of a PR. With a lot of code, things like exposing Swift functions to Obj-C which introduce new metadata can frequently be mistakenly added. For enterprise companies we also track the biggest modules in their binary, so eng managers can get a better understanding of where the size is coming from.
Lately Apple has been featuring size more prominently on the App Store, and it appears to be displaying the install size. This is also what users see when they look at which apps are taking up storage on their device in Settings. I think it’s important to reduce both, so users see a good number and downloads are fast/efficient. It is a very welcome change that binary encryption doesn’t negate all the gains from compression anymore. I had noticed it in the numbers but looked around for an official statement and didn’t find any, if you happen to know where this was announced I’d appreciate a link!