Emerge Tools
Emerge Tools
@emergetools
Sep 18 3 months ago 13 tweets Read on X
AI Summary

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

Tweet image 1

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

Tweet image 1

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)

Tweet image 1

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 👀

Tweet image 1
Tweet image 2

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

Tweet image 1

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

Tweet image 1
Tweet image 2

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

Tweet image 1

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

Tweet image 1

A few other areas Tesla can reduce size

- Image optimization
- removing unneeded binary metadata
- minifying localizations

Tweet image 1

Some links if you're looking to dive in more:

Using Dynamic Frameworks

gdsdecomp, the Godot decompiler we used

S/o for the initial tag!

@ssickle42
@emergetools I’ve got one for you all 😅 I think we all agree this is crazy for the functionality included. https://t.co/1clbRGu9vU

And lastly... now that we have our feet under us at 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...
21 tweets • 1 month ago
Read Thread
The Tesla iOS app is 760MB mainly because of a large Godot .pck file for 3D features, which can be decompiled and optimi...
13 tweets • 3 months ago
Read Thread
This thread explains that the Fidelity app has grown a lot, mainly because of adding big code libraries and debug info c...
14 tweets • 4 months ago
Read Thread
Exactly a year ago, we talked about iOS app size, and now Gmail's size is still growing, mainly due to big app files, ma...
11 tweets • 5 months ago
Read Thread
This thread shows how a wallpaper app called Panels makes money using lots of Google Ads, especially on Android, which h...
11 tweets • 5 months ago
Read Thread

Unroll Another Thread

Convert any Twitter threads to an easy-to-read article instantly

Have you tried our Twitter bot?

You can now unroll any thread without leaving Twitter/X. Here's how to use our Twitter bot to do it.

  • Give us a follow on Twitter. follow us
  • Drop a comment, mentioning us @unrollnow on the thread you want to Unroll.
  • Wait For Some Time, We will reply to your comment with Unroll Link.
UnrollNow Twitter Bot
Modal Image
0:00 / 0:00