Key Takeaways
Why IS the Gmail app 700MB?
They have a neat treemap breakdown here: https://www.emergetools.com/app/example/ios/com.google.Gmail
130MB is localization data.
This detail was interesting too: https://twitter.com/emergetools/status/1810790291714314706
> There's over 20k files in the app, 17k of which are under 4 kB. In iOS, the minimum file size allocation is 4 kB, so having many small files causes unnecessary size bloat. Gmail could save 56.4 MB by moving their small files to an Asset catalog
Android traditionally puts resources into a compressed archive, though, so by simply using an archive for storage, Google may be avoiding the 4k size problem.
I now see the article is about iOS app, but it looks like the Android app is anywhere between 50mb and 100mb (depending on the apk download side I look at) which is much more reasonable
That doesn't seem right. Localization feels like it should add a few MB. Not over 100. (Plus shouldn't it be compressed, and locally uncompressed the first time a language gets used?)
In the version I'm looking at there are 27,470 .strings files totaling 69 MiB, but they take up 155.9 MiB of disk space due to the 4 KiB filesystem block size.
The keys for the strings take up 39% of the space while the values take up 61%. About 12% of translations are duplicated (the word "Cancel" is translated like 53 times)
So 55% of the space used for strings localization is just pure waste due to having so many small files. The long keys are rather wasteful too and about 12% of the translations are duplicated (i.e. the word "Cancel" is translated 50+ times per language).
Honestly, it just looks like no one cared.
They probably just have lots of leftover localized assets that nobody dares to touch as they aren't sure if it's used anywhere.
The small filesize issue is something we commonly see in games, was surprised to see it for Gmail.
And btw we open-sourced much of our analysis after being acquired by Sentry: https://github.com/getsentry/launchpad
So compression/deduplication is probably the better option. Rather than storing as 1 zip per language, though, you'd probably want a compression format that also eliminates duplication that may occur between languages if you're storing all languages compressed on the system. That means you'd need compression to handle the entire language complex being in one massive compressed blob and you'd just extract out the languages you needed. I assume there are some forms of zipping that do this better than others.
[1] https://x.com/emergetools/status/1943060976464728250
[2] https://github.com/google/bloaty
And Gmail deserve to be shamed for shipping almost a gigabyte of stuff for a mailbox. Wouldn't be surprised if they accidentally/intentionally built the whole youtube client in there.
This isn't in my natural speech, but I quite like it; it seems to kind of imply "the people behind [company]" rather than anthropomorphizing the company itself. ...generally though I think it's just colloquial convention and not that deep.
In any case, I wasn't really interested in correcting or proving anyone right or wrong, just pointing out an interesting linguistic detail and where the grammar may have come from.
Due to the absence of (cross-app) shared libraries on at least iOS, developers often end up building big company-internal libraries that then have to be shipped with all of their apps.
Tree shaking isn’t perfect, and the result are these > 0.5 GB monstrosities.
The Gmail app size has to be assets, right?
"Note that you can also invoke GoHelloGreetings from Swift by importing Hello."
@import Hello
// ...
let msg = Hello.GoHelloGreetings("gopher")It doesn't bundle full random external libraries compiled with debugging symbols and "whatever other stuff".
Google needs to trim some stuff down.
Modern development is insane to me. "Let's do it badly, and hope a tool can fix it for us."
"Is anyone keeping an eye on the tools? No? Perfect!"
Particularly for developers inside the company that owns the platform. At some point they have to recognize they've completely screwed all this up.
(I do realize though that most "apps" are just websites without the browser toolbar, unfortunately)
I mean, it's certainly not anything to boast about from a technical perspective. I just don't know whether it's really enough to warrant any shame for the product though.
It's absolutely fucking ridiculous to have an 800MB app for this and the reason is just marketing. It's full of stupid videos promoting their stuff. And the account just causes stupid spam. I should have returned the damn thing to be honest.
Ps pardon my french but I'm really annoyed about this and in this case it's warranted in my opinion. 800MB is ridiculous.
Mimo app will never support as many devices as Linux kernel does.
Gmail has no such excuse.
It’s lazy.
The more likely outcome: because the app is huge, you'll uninstall it to save space. Then when there's no signal, you have no app at all.
lol remember the Karma?
The software crisis never ended. Instead, we also gained a hardware crisis.
The past year or so I've stopped buying stuff with an app before checking out how big the app is (if I plan to use it).
https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headline...
WHAT THE FUCK!
There are 4k videos there...
Just unbelievable.
Not saying it’s a good idea that they ship all of those big video files. Believe me, my MBP M1 with 256GB SSD barely has space left even when I go and clean up various files I no longer need.
Foolish as I was, I believed that doubling the amount of storage compared to the MacBook Air I had before it would leave me with plenty of space for years to come. In reality it did not take much time before I was using most of the storage available.
So when I bought my latest iPhone not long after I bought that MBP, I opted for the iPhone model that has 1TB storage. And at least on my phone I consistently have a good amount of space left. Every couple of months I move pictures and videos from the phone to an external hard drive. So since it was only a week or so since last I moved pictures and videos from the phone, I am currently using 350 GB of storage on the phone.
Out of those currently used 350 GB, just under 40GB is accounted for by music I have downloaded in the SoundCloud app, which is ok even though maybe a little bit silly on my part. I have it set to download all songs that I favourite, and I sometimes manually download whole albums and whole playlists. Not because I want to listen to all of it offline but so that when I am offline I still have a wide selection to choose from. For example on the occasion that I fly by plane once or twice a year.
Another 20GB of storage space is used by maps I’ve downloaded in the Organic Maps app to have locally saved maps for various places I’ve been to or want to go to. Again, a little bit silly to keep that much map data even for the places that I am not going to visit for at least 6-12 months, and which will need to be updated again when I do go there to ensure I have up to date maps. But all in all, I can “afford it” with a terabyte total storage. And both the songs in SoundCloud and the map data is data that I could manually go through and delete as much of as I’d like to if I ever were in a pinch and needed to free up space.
At times I will hoover around 700 GB of storage used on the phone if it’s been a while since I moved pictures and videos and I have filmed some longer videos.
My phone being a few years old now however, it doesn’t have USB-C. So it takes a bit of time to move pictures and videos from it. Even if I transfer over the network it doesn’t seem much faster than USB 2.0, weirdly.
Gboard 247MB
Google 415MB
Google Play Services 1330MB
Google Play Store 165MB
Messages 321MB
Gmail 233MB
On the middle side of that range, extra features adds up fast.
Apple Mail leverages libraries and frameworks already present on the device.
Google uses libraries and frameworks very likely already present on say Android, but on iOS they have to ship a gigantic runtime that implements those things the app depends on; this way they only have to write the app once for several supported platforms.
I’m just speculating by the way but it sounds like the likely reason.
You’ll notice Google Docs or sheets are equally gigantic because each also ships a copy of those enormous runtimes.
> Product Requirement: Even if the user deletes the Chrome app, the Gmail app must work to display HTML emails, the authentication screen including 2FA options, etc. Can’t rely on WebViews for security reasons.
Android does that already and allows apps to use it (the webview)
For apps like Gmail and a handful of others, they are big enough that they need multiple layers of fallback. e.g. they can't just use a networking layer, they need a fallback separate implementation in case that breaks, so that they can recover. They might have 2 or even 3 options for some of the critical parts, all so that if stuff goes wrong they can as close to guarantee recovery as they can get.
Mobile is quite specific in this regard, because you don't have hardware access, network is heavily restricted, battery reduces the amount you can do, etc.
Source: I work on mobile SRE things at Google.
Compare the size of Safari.app versus Safari Technology Preview.app (which actually ships all the frameworks it needs).
Apple can bundle whatever they want because they are the device manufacturer, not a supplier.
With Safari it's a lot easier to see, as you can get the standalone version.
- They speak of HN as a single thing, so presumably not a third-party implementation but the official one
It is dependencies, if you ever compiled almost any GUI application via prots/pkgsrc on a BSD, you will be shocked by the dependencies that application needs, it is obscene.
Those are typically apps which need to be heavily secured. So behind the seemingly "simple" user interface and functionalities, there's so much security related code to ensure their "safety".
Edit: I see you added in a link. "The research found that more than half of the 1200 developers surveyed are unable to ensure that their code is protected from seven common vulnerabilities", hmm maybe it was not a joke? The article (or the survey it's based on) sounds extremely misguided though, sounding comparable to saying that only X% of farmers never had a single rotten apple so clearly it's not a 'top' priority for them to produce quality at all cost
Oh, and I just noticed you're the same person as whom I was responding to above. That explains
Fwiw, I do security audits as a day job so I have some idea of which coding practices lead to good security and it's not download size. You can try this "you're just a developer" again on someone else maybe
Unfortunately the entire Internet is bloated with such extremely misguided jokes. Here is another misguided joke:
"We have a fundamental problem in the way we develop software. A large percentage of software is created by people who were never trained on the basics of security. " [1]
[1]: https://buildingacareerinsecurity.com/why-developers-dont-kn...
146 more comments available on Hacker News
Not affiliated with Hacker News or Y Combinator. We simply enrich the public API with analytics.