115 MB of Plugins
109 MB main app target binary
34 MB sqlite file ๐ (more on this later)
23 MB Dynamic Frameworks
The rest is assets, localizations, misc. Let's start with the Plugins ๐
115 MB for two app extensions is a lot ๐ซจ
We see two Plugins that look almost identical (58 MB vs. 57 MB) with many of the same modules in each.
They can likely use a Dynamic Framework to share code between these two app extensions to help reduce total Plugins size
In total, we see 25 MB of duplicate files, mainly coming from the SGPKitPackage_Mocks.bundle
Additionally, Trainline could cut 18 MB from removing binary symbol metadata and 11 MB from optimizing images
That's 54 MB of low-hanging fruit to reduce app size by 15.8% ๐ฎโ๐จ
Back to that .sqlite file, this accounts for 10% of install size (34 MB)
Looking into it, this looks like data about all the cities and stations in the Trainline appโ data like names, latitude, longitude, timezone, etc.
This probably lets people use Trainline features even in unreliable network conditions (like when you're traveling on a train through mountains), so that's pretty cool!
You know what else is cool? Making your app smaller & easy to download in poor network conditions ๐
And lastly, we found various images regarding Trainline + sustainability โป๏ธ
It's great to see that a company like Trainline is putting sustainability front and center ๐
Friendly reminder that app size does have a tangible impact on CO2 emissionsโ there's a cost of every byte transferred ๐ฑ
For an app the scale of Trainline, low-hanging size optimizations can actually make a big impact! We have a blog post about this too๐ emergetools.com/blog/posts/Cosโฆ
It's always fun taking a deeper look into these appsโ feel free to continue tagging @emergetools for any of your app size questions! ๐ซก
The apps went above that, reducing app size by ~300 MB
The main optimization came from renivubg TardisHybridContainer, which is where the vast majority of bloat came from in each app. Basically this was a mess of a dynamic framework w/ inefficient assets + a large jsbundle