So, HBO Max is now Max. New app, new bundle id, new logo, & entirely new codebase. Let's start by comparing the iOS size and architecture
iOS
HBO Max (old app): v53.20.1 - 60.4 MB install size
Max (new app): v1.0.1 - 108.8 MB
The new iOS app is 48.4 MB (~80%) bigger
Here's our X-Ray for the old HBO Max app. It consists of
~18 MB of images (top left)
~11 MB main.jsbundle (top right)
~15 MB main binary (bottom left)
The rest are misc frameworks, plugins, bundles, fonts, etc.
There are very few dynamic frameworks (3.9 MB) in the old HBO Max app - they're using Hermes for RN & some utility frameworks to help move around data
Now the new iOS app
There's 87 MB of dynamically linked frameworks, bigger than the entire old app
There are no plugins or extensions - a good opp. to statically link most of these frameworks. This will reduce app launch time and overall app size (explanation link at end)
Another thing that stands out is they have a 13 MB img in `error-overlay-bg`... this image is just a gradient (2nd screenshot)
So if we're comparing Peacock's switch to HBO's switch - Peacock switched & was able to remove libraries, HBO added them. There's a lot more going on and HBO could be doing a better job (static linking + our other insights), but that's one reason for increase in size
Now for Android
HBO Max (old): v53.20.1 - 54.9 MB download size
Max (new): v1.0.1 - 24.5 MB
The new app is 30.4 MB (~55%) smaller... so how is it almost double the size on iOS, but half the size on Android?
Here's our X-Ray for the old HBO Max app on Android
The main thing to notice is that HBO Max was shipping a universal APK, which means they are shipping assets, architectures, and languages for *all* devices / locales that they support vs. shipping what a specific user needs
The easiest place to see it is in the architecture portion of the X-Ray. You can see they're shipping the Hermes library 4 different times. This is happening for every library
Onto the new Android Max app
Max is shipping an AAB, meaning users download split APKs specific to their device
Before there was just one apk, now there is a base.apk + 3 others
That said, the change in size isn't solely b/c of split APKs
Native libraries decreased from 18.9 MB (old) -> 515 kb (new). But the old app still had ~5 MB of native libraries in each architecture, where the new app has 0.5 MB in one architecture
What are Native Libraries? Where Java & Kotlin compiles to dex, code written in C/C++ (among others) is packaged into native libraries (.so files) & compiles to native code
B/c there’s no more RN, the new app could remove most native libraries, which were used for RN
While native libraries decreased, the size from Dex increased, going from 3.6 MB -> 16.5 MB
This dex size increase is likely not directly related to HBO going native, rather a lack of optimization when building their release build (& potential security risk)
This is an entire post in and of itself, but tl;dr, the new app is not obfuscating any dex code. Code isn't minified and entirely human readable (this is a release build from the Play Store)
This requires more bytes to be shipped + loaded into memory when using the app
Recapping
HBO shipped an entirely new app (& logo), going cross-platform -> native
iOS nearly doubled and Android was cut in half (classic). The comparisons are not "apples to apples" though b/c of how much the apps differ
The decision to ship an entirely new app is massive - every single user is going to have to download the new app
Why a whole new app? How much of a reason was driven by wanting to go native asap vs. incrementally changing like Peacock did
Your guess is as good as ours
If you're interested, here's the thread on peacock
How did the @Twitter iOS app change over the last 6 months? Why did the latest release of Google Translate Android reduce app size by 1/3rd?
We try to make these questions easier to answer, which is why we're very excited about our newest feature, AI summaries of build diffs
Jumping right in - Twitter v9.59.1 vs. v9.34.6 (iOS)
Overall size decreased by 34 MB, but how quickly can we identify what changed?
The summary is pointing to removals of plugins and bundles, which is easy to see in the X-Ray diff
T1Twitter.framework is also highlighted in the summary. Searching through the diff, we can see that many assets were modified or removed to reduce its size
What happens to an app's performance when it goes from react native -> native?
The @peacock app just made the switch on iOS & Android and had a significant change in size and startup time
🧵 Performance impact of switching to native
A quick primer
RN let's you create mobile apps for Android and iOS using js & react. 1 codebase, 2 apps. It has an active community & there are certainly reasons you'd want to use RN
That said, if performance is important, native is going to be better
A few reasons
- JS is an interpreted language vs. native (Swift & Kotlin) is compiled
- RN is *mostly* singled threaded. Concurrency is complex and not as performant
- Native has easier access to device & OS features. RN requires more libraries to achieve functionality