Live data from Hacker News

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

telkins.dev

261–270 of 452 posts

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

#261
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…

This bizarre reasoning puzzles and infuriates me so much. The linked post shaves more than 40% of an app's size in 5 minutes, by doing nothing but being curious about the half-gigabyte app and knowing how to use a couple of tools.

This is not a case of "I have plenty of water so let the kids splash some in the playground to have fun", this is a case of "I have plenty of water so I will load 10000 liters in a truck and drive 1000 kilometers and back just to dump them in the desert for no fucking reason".

Seriously, 5 minutes? I spend more than that in the bathroom. How many 5-minutes is a "Scrum standup"? a "progress meeting" ? a ? Do all of those things not waste the engineers' time?

I'm trying to imagine the world if every profession and craft tried to justify this disgustingly irresponsible mindset :

" - This combustion engine uses an inferior injection mechanism that wastes 40% more fuel compared to latest...

= Don't waste my time!!! I have more important things to worry about.

-.... It would take 5 minutes to fix

= Customers don't notice the fuel consumption anyway, so that means robbing them out of money with inferior engineering is okay. Now hurry up, we'll miss the daily 3-hours progress meeting. "

If only Donald Knuth knew what " Forget about the small efficiencies" would be used to justify.

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

#262
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.

Does it make sense? Every time I click a link in GMail it opens some weirdly broken browser imitation instead of opening it in my chosen browser. This is supremely weird.

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

#263

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.

Unrelated to their inflight entertainment, United pulled this stunt on me the other day. - Flight at 11AM, boarding at 10:20. - Show up at 10:25, boarding doors are closed. - "Didn't boarding start 5 minutes ago" - "Yeah we close the doors once 95% of people show up, sorry, you should show up when boarding starts" - "Yeah but didn't boarding start 5 minutes ago, how was I to know" - "You should have known, sorry"

They managed to board all the other passengers in less than 5 minutes? In my experience boarding takes at least half an hour just for everybody to sit down. Was the flight exceptionally empty?

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

#264
post #18

Earlier quoted context omitted.

Do iOS apps still use bitmap graphics?

In many cases yes, but svg support has been available in xcode since ver. 12 and before that pdf had been available. As a consultant I haven't worked on a project yet where vector assets has been chosen over bitmap

But does Xcode convert PDF and SVG to various PNG assets?

https://bjango.com/articles/svgassetcatalogs/

It's my understanding, as a designer, that it was auto-generating 2x and 3x PNGs as from your vector assets, and that's what actually got bundled in the final app—and that PNG compression was not good compared to what I could get by going through ImageOptim.

I would be quite happy to be wrong about that. It would save me a lot of time.

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

#265

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).

Southwest app is 41MB installed. I know it does have a video player installed as Southwest let you stream from the browser.

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

#266

Ignoring the economy of the development process, vs. just being able to push out an app quickly, I cannot help wonder how small, and fast apps like this could be, without losing features. Sure stripping out symbols is a quick thing you can do, but how about eliminating the ad tech stuff (people already bought the ticket, leave them alone). Remove the dependency of 3rd. party libraries and frameworks, utilizing only t…

Check the article there is code for Soduku.

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

#267
post #241

Earlier quoted context omitted.

Yes, but the 3mb is just the wrapper, I bet if you delete the hundred-ish megabytes of cache, it won't work offline anymore :)

But that's entirely fair: of course caching data uses up storage. But it's my choice - I can pay for what I use. The crucial part is that I don't need to download an app which is hundreds of megabytes large just in order to hypothetically support caching. No one can tell me that our species can write 1K ZX Chess ( https://en.wikipedia.org/wiki/1K_ZX_Chess ) – an entire chess game with intelligent opponents which only…

It's often the high-res assets (images, videos, sounds, animations etc.) which take up most of the space, not the code itself.

When it comes to the code, the reason that they are bigger is how apps are distributed and have isolated runtimes. There are several commonly used sdks and libraries but because of how mobile app distribution works, these common libraries have to be bundled with each app and are not installed as a reusable library (like you can do with Linux, for example).

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

#268
post #208

Earlier quoted context omitted.

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.

For a lot of trips, Amtrak is about the same as flying. Looking at a round trip from NYC to Chicago, on the arbitrary dates of March 26 to April 9, Amtrak costs $180 while Kayak shows the cheapest flights at $159. Of course, Amtrak takes much longer (20 hours) but is less hassle, and at that price the flight only lets you take one carry-on while Amtrak lets you bring two checked bags and two carry-ons. Adding checked bags will add $60 for the first and $80 for the second. Amtrak is also better for the environment if that matters to you, and the price difference is about the same as the cost of the carbon offset for the flight.

Overall, choosing Amtrak or flying is perfectly reasonable in different situations. Amtrak could definitely be improved a lot though!

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

#270
post #51

Earlier quoted context omitted.

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…

This is not the most relevant tradeoff. The United App is the only way to watch in-flight entertainment on many United Flights (esp. on newer planes without seatback screens). Every time I fly United, they make an announcement that says "Make sure to download the app before we take off because you can't do it once we're in the air!" and then I see everyone whip out their phones and tablets. Usually that's 10m or so b…

Maybe Apple could provide some way to cache apps on a local network without needing a Mac. (macOS has a content caching option in the Sharing prefpane.) They could add the same thing to iOS/tvOS to make it cheaper and more widely available. Ideally there would be a containerized version of the service that could run on any Linux-ish device...can't imagine Apple doing that though.
Post reply on HN