192 karma · joined Oct 18, 2013 (13y ago) · 40 submissions
2.
A reliable, open-source way to profile iOS apps(github.com ↗)
5 points · by sond813 · 3y ago · discuss
comment 3y ago · link · parent
4.
How to speed up conformance checks in Swift by ~20%(emergetools.com ↗)
5 points · by sond813 · 3y ago · 1 comment
comment 4y ago · link · parent
comment 4y ago · link · parent
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+...
comment 4y ago · link · parent
9.
The Surprising Cost of Protocol Conformances in Swift(emergetools.com ↗)
59 points · by sond813 · 4y ago · 12 comments
comment 5y ago · link · parent
comment 5y ago · link · parent
14.
Why Swift reference types are bad for iOS app startup time(medium.com ↗)
21 points · by sond813 · 5y ago · 3 comments
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
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
comment 5y ago · link · parent
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
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-...
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
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.