The Tesla iOS app is 760MB mainly because of a large Godot .pck file for 3D features, which can be decompiled and optimized. About 25% of the size is from duplicate plugin files that could be reduced with better structure. Also, the main.js bundle has unnecessary debug info. Overall, Tesla can make the app smaller by removing duplicates, optimizing images, and trimming debug data.
Do we know why the Tesla iOS app is 760 MB? Can it be made smaller? Does a bear...nvm
This is a fun one, b/c the Tesla app does something not many other apps do
🔬 Taking a look at Tesla's app size + exploring
Immediately what jumps out is that ~30% of the app is `Tesla.pck` (241.2 MB)
A .pck is a file format for bundling Godot assets (scenes, scripts, shaders, etc)
Out of all the app's that we download, this is *by far* the largest .pck included in an app
We can see Godot included in all of Tesla's plugins + the main app target
This is how Tesla creates 3d model interactivity in the app
(remember this b/c we'll be coming back to the plugins)
The cool thing about a .pck (and the internet) is that we can actually decompile it to see raw assets + project structure.
We can even open it in Godot 👀
That's the Godot functionality - how could Tesla make the app smaller?
Remember how Godot was shipping in each Plugin? There are 5 plugins in Tesla for a total of 188.3 MB
The contents of each Plugin appear to be ~nearly~ identical
We can see this pretty clearly in the diff between v4.47.0 and v4.42.0 when the app increased by 50 MB
Each plugin added the same three `SwiftModules_*.bundle` files + had similar increases in binary size
A better way to look at it - the deep red is duplicate nodes (there are quite a few)
So ~190 MB (25%) of Tesla is coming from Plugins, which could be significantly reduced by using a dynamic framework
Other area for improvement - Tesla (uses RN) has a 96.6 MB main.jsbundle, but 26.7 MB is "debug info"
The debug info is meant to provide better stack traces, but it doesn't need to be in prod b/c you can provide it separately to crash reporters
And lastly... now that we have our feet under us at @getsentry we're going to get back to active here so plz tag us if you want to know about an app!
You might even see a pretty different UI soon 👀👀👀
Do we know why the Tesla iOS app is 760 MB? Can it be made smaller? Does a bear...nvm
This is a fun one, b/c the Tesla app does something not many other apps do
🔬 Taking a look at Tesla's app size + exploringImmediately what jumps out is that ~30% of the app is `Tesla.pck` (241.2 MB)
A .pck is a file format for bundling Godot assets (scenes, scripts, shaders, etc)
Out of all the app's that we download, this is *by far* the largest .pck included in an appWe can see Godot included in all of Tesla's plugins + the main app target
This is how Tesla creates 3d model interactivity in the app
(remember this b/c we'll be coming back to the plugins)The cool thing about a .pck (and the internet) is that we can actually decompile it to see raw assets + project structure.
We can even open it in Godot 👀That's the Godot functionality - how could Tesla make the app smaller?
Remember how Godot was shipping in each Plugin? There are 5 plugins in Tesla for a total of 188.3 MB
The contents of each Plugin appear to be ~nearly~ identicalWe can see this pretty clearly in the diff between v4.47.0 and v4.42.0 when the app increased by 50 MB
Each plugin added the same three `SwiftModules_*.bundle` files + had similar increases in binary sizeA better way to look at it - the deep red is duplicate nodes (there are quite a few)
So ~190 MB (25%) of Tesla is coming from Plugins, which could be significantly reduced by using a dynamic frameworkOther area for improvement - Tesla (uses RN) has a 96.6 MB main.jsbundle, but 26.7 MB is "debug info"
The debug info is meant to provide better stack traces, but it doesn't need to be in prod b/c you can provide it separately to crash reportersA few other areas Tesla can reduce size
- Image optimization
- removing unneeded binary metadata
- minifying localizationsSome links if you're looking to dive in more:
Using Dynamic Frameworksgdsdecomp, the Godot decompiler we usedS/o @ssickle42 for the initial tag!And lastly... now that we have our feet under us at @getsentry we're going to get back to active here so plz tag us if you want to know about an app!
You might even see a pretty different UI soon 👀👀👀
yes
Do we know why the Tesla iOS app is 760 MB? Can it be made smaller? Does a bear...nvm
This is a fun one, b/c the Tesla app does something not many other apps do
Taking a look at Tesla's app size + exploring ... Immediately what jumps out is that ~30% of the app is `Tesla.pck` (241.2 MB)
A .pck is a file format for bundling Godot assets (scenes, scripts, shaders, etc)
Out of all the app's that we download, this is *by far* the largest .pck included in an app ... We can see Godot included in all of Tesla's plugins + the main app target
This is how Tesla creates 3d model interactivity in the app
(remember this b/c we'll be coming back to the plugins) ... The cool thing about a .pck (and the internet) is that we can actually decompile it to see raw assets + project structure.
We can even open it in Godot ... That's the Godot functionality - how could Tesla make the app smaller?
Remember how Godot was shipping in each Plugin? There are 5 plugins in Tesla for a total of 188.3 MB
The contents of each Plugin appear to be ~nearly~ identical ... We can see this pretty clearly in the diff between v4.47.0 and v4.42.0 when the app increased by 50 MB
Each plugin added the same three `SwiftModules_*.bundle` files + had similar increases in binary size ... A better way to look at it - the deep red is duplicate nodes (there are quite a few)
So ~190 MB (25%) of Tesla is coming from Plugins, which could be significantly reduced by using a dynamic framework ... Other area for improvement - Tesla (uses RN) has a 96.6 MB main.jsbundle, but 26.7 MB is "debug info"
The debug info is meant to provide better stack traces, but it doesn't need to be in prod b/c you can provide it separately to crash reporters ... A few other areas Tesla can reduce size
- Image optimization
- removing unneeded binary metadata
- minifying localizations ... Some links if you're looking to dive in more:
Using Dynamic Frameworks ... gdsdecomp, the Godot decompiler we used ... S/o @ssickle42 for the initial tag! ... And lastly... now that we have our feet under us at @getsentry we're going to get back to active here so plz tag us if you want to know about an app!
You might even see a pretty different UI soon
Missing some Tweet in this thread? You can try to
Update
More Threads by @emergetools
Most big iOS apps have huge localization files, taking up lots of space. Airbnb cut theirs by 82% using two tricks: comp...