Live data from Hacker News

App sizes are out of control

trevore.com

121–130 of 455 posts

Re: App sizes are out of control

#121
post #108

I wonder is this is due to lack of generics in objc.

Objective-C has fully dynamic dispatch. In a context like that, generics are just a type safety thing to ensure that you aren't sending messages to the wrong type — they don't make the executable any smaller.

They make code reuse possible. Watch this Sean Parent video https://www.youtube.com/watch?v=4moyKUHApq4 where he estimates that if Photoshop was rewritten using generics, the code size would go from 3,000,000 LOC to 30,000 LOC. You are right, during compilation, generics are specialized so you end up with code, however going all in on generics removes a lot of accidental complexity.

Re: App sizes are out of control

#122
post #26

Earlier quoted context omitted.

Could it be that whenever coders today need some fairly trivial functionality, they tend to go out and find a library that contains it. So you end up with lots and lots of libraries where only a tiny bits of them are used. Just a hypothesis though.

There are many reasons why apps are so big, but I think you are right about a major part of the problem. Development environments these days make it very easy to add in third party libraries for very little effort. At a previous job we had a monolithic java server that ended up at over 350Mb of compiled code simply because each development team had imported whatever libraries they thought they needed. In some cases,…

i don't see why any of this is a problem

Re: App sizes are out of control

#123

I have been replacing traditional apps with PWA's or mobile websites wherever possible (on Android). They hardly take up any space and also seem to behave well (drains less battery) compared to traditional apps. I could replace the following with PWAs: - Twitter - Uber - Lyft - Google news - Instagram - Flipboard - Shopping sites like Walmart, Wish and many more. Facebook and Amazon have no PWA's but have mobile webs…

PWAs? Public Welfare Assistance schemes?

Progressive Web Apps

Re: App sizes are out of control

#124

I have been replacing traditional apps with PWA's or mobile websites wherever possible (on Android). They hardly take up any space and also seem to behave well (drains less battery) compared to traditional apps. I could replace the following with PWAs: - Twitter - Uber - Lyft - Google news - Instagram - Flipboard - Shopping sites like Walmart, Wish and many more. Facebook and Amazon have no PWA's but have mobile webs…

PWAs? Public Welfare Assistance schemes?

Pretty^W Progressive Web Apps (https://developers.google.com/web/progressive-web-apps/)

Essentially, apps on the web that feel and behave like a native app.

Re: App sizes are out of control

#125
post #18

Normal apps are around 10 to 20mb, which is still big. But the reason for this is support for different screen resolutions. Images of different sizes are bundled with the app, even though the phone only needs on of them. Vector graphics will solve this, but is not mainstream yet. The facebook android app is 88MB (zipped), i did check the APK of why its so big: 90mb of code 30mb of assetes (javascript, metadata, librt…

> Vector graphics will solve this, but is not mainstream yet. Then you're trading off battery life vs. space. Vector graphics can be far more expensive to render than bitmaps.

Is it possible maybe to render out the vector graphics once (on the device) and then have them pre-rendered (cached) until they change?

I guess it would add considerable overhead for a negligible improvement in size (compared to just shipping all images) for most devices.

EDIT: Too slow...

Re: App sizes are out of control

#126

Things will only get worse. The application paradigm is unsustainable. https://medium.com/@miguelrochefort/the-application-paradigm...

The current alternative, treating the Browser like a poorly implemented, feature-scarce OS on which to run "web apps", is worse.

Re: App sizes are out of control

#127
post #70
post #52

Earlier quoted context omitted.

> I wonder if it's possible to get major open-source libs to move towards more fine-grained build targets and internal dependency management, so that devs don't pull in a gigantic binary when they're only using a small slice of the functionality. Fwiw, this is already a trend in JavaScript land. Libraries are moving towards many small packages so you can import only the parts you need either manually or using a tool…

I don't think that's the right solution to the problem. Nobody wants libleftpad.so, and as someone who works on a distribution the very concept is horrific (making distribution packages for every three-line package does not make anyone happy). What I think GP was arguing for is that you have libstring.so which you can strip down to just having leftpad or w/e with Kconfig or similar configurations (preferably at link…

JavaScript people do not create libleftpad.so, they create libleftpad.o (metaphorically speaking), which will not clutter up your distribution, it will just clutter up some apps. I'd rather see 50 little files like libleftpad.o than 5 gigantic libraries.

But I agree with what you're saying in the second paragraph, which actually sounds just like what my GP meant by using "Webpack to throw away what isn't used". Having unused parts of larger libraries cut out would be a much cooler solution than just telling everyone to eschew kitchen sinks in favor of many tiny, bespoke items. Especially since finding the right small libraries is much harder than finding a kitchen sink that just works and has a sizable community behind it

Re: App sizes are out of control

#128

The Phillips Sonicare Kids app, which is nothing more than a simple game for kids to track brushing their teeth, is 245MB. I guess the good thing is that it gave me an opportunity to teach my kid about tradeoffs. "Ok, so if you really want this app, we're gonna have to delete 4 of your other games on the iPad." Even a 5 year old could reason his way out of that one.

[deleted]

Re: App sizes are out of control

#129
Im just guessing this is to corner of a good amount of disk space so the app does not stop working from lack of space.

An analogy is when downloading a torrent; the torrent blocks a chunk of space on your disk equivalent to the size of the file being downloaded. As the file is being downloaded it replaces junk in the blocked chunk.

Again all this is my speculation.

Re: App sizes are out of control

#130

I have been replacing traditional apps with PWA's or mobile websites wherever possible (on Android). They hardly take up any space and also seem to behave well (drains less battery) compared to traditional apps. I could replace the following with PWAs: - Twitter - Uber - Lyft - Google news - Instagram - Flipboard - Shopping sites like Walmart, Wish and many more. Facebook and Amazon have no PWA's but have mobile webs…

I've been doing this too; but annoyingly I usually am in Private Browsing mode and when I go to launch one of these apps it doesn't work because I'm no longer logged in.
Post reply on HN