Live data from Hacker News

I shaved 187MB off United Airlines' 439MB iOS app

telkins.dev

221–230 of 452 posts

Re: I shaved 187MB off United Airlines' 439MB iOS app

#221

It's 78MB on Android (Pixel 6 Pro). That's one of the hidden advantages of Android: much smaller apps. Makes for faster downloads, less storage consumption, and maybe even better caching / performance. It's common for iOS apps to be 4-5x bigger than Android apps.

For me the download from Play store is 78 MB, but it expands to 237MB once installed (One Plus 6T Android 11).

Re: I shaved 187MB off United Airlines' 439MB iOS app

#222

I once flew United and, like the author, didn't realise this until I was on the plane for a ten hour flight. Downloaded the app for Android. I opened it. I was immediately ip-blocked for having a rooted phone, which was then kicked off the network and couldn't get an IP address. United cabin crew then started trying to sell me an iPad loan for the duration. I read a book and vowed never to fly with them again.

> I was immediately ip-blocked for having a rooted phone What is wrong with using their app on a rooted phone?

Not saying it's the right decision, but probably because they don't want the liability if a rooted device allows some 3rd party app to hack theirs. Airlines can be somewhat like a small bank in this respect, as being logged in gives you access to things like accumulated loyalty points, not-flown-tickets that can be exchanged/refunded, past flight credit from earlier refunds that were eligible for credit but not a cash refund, etc.

Also, they typically store more personal info than, say, an e-commerce application because some of it is needed for travel. Things like date of birth, known traveler numbers, names/dob/etc of family members, passport numbers, etc.

Re: I shaved 187MB off United Airlines' 439MB iOS app

#223

Earlier quoted context omitted.

Isn't chat, meeting, etc all separate apps from Google (and not included in the core Gmail app). https://apps.apple.com/us/app/google-chat/id1163852619 https://apps.apple.com/us/app/google-meet/id1013231476

They've shoved all that functionality into the Gmail app. I actually uninstalled Gmail because it became the default app to open Google Meet video calls, even with Google Meet installed. I don't need my email app asking me for video and microphone permissions...

This specific case is more of an artifact of iOS's inability to handle multiple apps declaring the same URI launch scheme cleanly than a problem with Gmail on iOS, in my opinion.

Picking a default handler for a given scheme seems like a problem best solved at the OS level, and I don't even know how an app developer would be able to fix that.

Re: I shaved 187MB off United Airlines' 439MB iOS app

#224
post #179
post #135

Earlier quoted context omitted.

To add some context, Gmail also includes a lot of the core workspace apps(chat, meetings, etc) if you do have a workspace account, which most users will likely never see. All of that isn't needed on regular accounts, I guess, but it's probably easier for them to ship it as one app because people might get confused/are able to switch between their workspace and regular accounts in the app. Gmail is also supposed to be…

Gmail being a "hub app" makes some sense, actually (unless you're not using Chat or Meet, of course). What annoys me much more than that is that Docs, Sheets and Presentations all are multi-hundred megabyte standalone apps, of which I'm guessing 80%-90% of the code is identical/pulled in from some non-shared library.

Yea I am definitely one of those people who hates all that crap in my email app - I have workspace at work and normal gmail for home use and even on desktop it just annoys me. I like having a big fat separate chat window for all the people I'm annoying

Re: I shaved 187MB off United Airlines' 439MB iOS app

#226

Earlier quoted context omitted.

I’ve built a full android IRC client in 4.1MiB. Most UI elements are custom, no web view for anything, lots of custom libraries etc. That’s > 200kLOC. I can’t fathom what you’d have to do to get to 100x that.

Can’t imagine an IRC client has many high resolution assets.

Why should it? Android supports vector assets, I ship everything as vector drawables. 98 vector assets, full text of 11 licenses and translations for 9 languages are > 90% of the 4.1MiB

That said, what assets does an email client need beyond what I use as well?

Re: I shaved 187MB off United Airlines' 439MB iOS app

#227

I spent the last ten years of my career building iOS apps, all but one you would likely known at the time, and whoever in charge of this app is an idiot. Shipping an app to the general public with symbols intact? Really? If they didn't know/didn't care, it tells me no one there likely cared about any other quality issue either. It's highly likely that any relevant lead person probably screamed about this daily, but h…

Speaking of United shipping apps with symbols intact...

Last week I came across some unminified JS on United's website[0]. I love the warning it starts with:

   /* Minification failed. Returning unminified contents.
   (5218,49-69): run-time error JS1300: Strict-mode does not allow assignment to 
   undefined variables: nearbySearchErrorMsg
   */
Never seen a minifier fail by not minifying before. Also interesting seeing all the commented out code and TODOs.

[0] https://www.united.com/ual/bundles/js/flightsearchresults

Re: I shaved 187MB off United Airlines' 439MB iOS app

#228
post #65

You know what also have huge app sizes, it's various iOS email app. Fastmail is the only email/calendar app with a reasonable size (just 20MB) [0]. - Gmail (397MB) [1] - Outlook (328MB) [2] - Hey (69MB) [3] - Protonmail (128MB) [4] [0] https://apps.apple.com/us/app/fastmail-email-calendar/id9313... [1] https://apps.apple.com/us/app/gmail-email-by-google/id422689... [2] https://apps.apple.com/us/app/microsoft-outlook/…

Used Emerge Tools size analysis to analyze the binaries, here's some quick findings to answer some questions: [0] Fastmail: smallest of the apps but still could have room for improvement, could save almost 20% of the app size by optimizing their audio files. 71% of the app is the binary. Check out the X-ray here: https://emergeassets.s3.us-west-1.amazonaws.com/Screen+Shot+... [1] Gmail: looks like most of their bloat…

Thanks! This is very interesting to see all the low hanging fruit. Out of curiosity, could you run Emerge on a few other common apps: the United app as well as Yelp, Twitter and TikTok?

Those seem to be the biggest consumer of storage for me.

Re: I shaved 187MB off United Airlines' 439MB iOS app

#229
post #208
post #159

Earlier quoted context omitted.

Flying anywhere, period, is a luxury

I don't know if you're trying to make a point about global living standards (irrelevant) or the non-necessity of air travel (true, but also irrelevant), but the fact is that budget airlines have existed for decades, and are often comparable in price to a bus trip.

Flying is far cheaper than Amtrak.

Re: I shaved 187MB off United Airlines' 439MB iOS app

#230
post #51

Earlier quoted context omitted.

I’d like to approach this differently, and think about what it would have cost United Airlines to do it “the right way”, versus what value it brings them. I’m the first to say that this utter bloat is terrible, but most people aren’t really bothered by it. And I can only imagine that they outsourced their app development completely and like to keep costs low. From that perspective, it’s probably much more pragmatic t…

Contrarian opinion here; I understand their logic. It looks like a rational trade-off that the engineers have done. Increase developer productivity at the expense of hardware. In this case, engineering is more expensive than hardware (because hardware is at the cost of the user). The smallest iPhone starts at 128 GB. This means the application takes 500/128000 blocks: 0.4% of the total device storage. Over time, the…

When someone starts looking into why it's so big and they immediately discover a huge dumb mistake (the example in the post), why do you assume that the rest of the app size is because of rational tradeoffs, instead of being more dumb mistakes?
Post reply on HN