Live data from Hacker News

App sizes are out of control

trevore.com

111–120 of 455 posts

Re: App sizes are out of control

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

I interpreted the comment in exactly the same way, and once again I'm baffled to see a perfectly polite and correct comment downvoted and greyed out.

Re: App sizes are out of control

#112

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?

interesting how Google’s personalized search results gave me the right definition of that

Re: App sizes are out of control

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

Maybe you're not familiar with how it works. The idea is that you do, let's say, "import lodash" then your packaging system says "A-ha! But you're only using these 5 methods!" and only packages those.

Behind the scenes, lodash is built out of many modules, but you as a developer don't need to think about that.

Because tooling isn't perfect yet, you have the option of helping it out manually and being explicit about importing submodules. We were able to reduce our compressed JavaScript size by some 60% using a combination of automatic and manual tricks like that at my day job.

Re: App sizes are out of control

#114
post #28

Earlier quoted context omitted.

Apparently, Crosswalk [1] for Android adds "only" about 20MB. I just compiled a Cordova-based Android-app without Crosswalk, but also without images. Just JavaScript, HTML and CSS and a few plugins and the APK is [1]: https://crosswalk-project.org/

I think a few more years and we can finally stop bundling browsers. It's not like anyone wants to bundle a browser inside their app for fun. That being said, Crosswalk really solved some serious issues for my product so cheers to them.

Yeah, I used it a year or two ago, and it was nice for making sure the experience was the same across all Android devices. Glad to see the built-in Webview is getting place.

Re: App sizes are out of control

#115

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 Applications

It's the new name for a home screen bookmark.

Re: App sizes are out of control

#116

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 think that's a fine solution, but its looking at the wrong problem.

Consider an app like Discord [1], which is built using React Native and is thus a "native" app with some additional cruft like a JS runtime. It clocks in at a relatively small 30mb. Not bad.

Then consider Slack [2]. For nearly intents and purposes it does the same exact thing. Discord has far more functionality than Slack. Yet, it is 129mb.

Tweetbot [3]? 12mb. Twitter [4]? 204mb.

The issue has little to do with the technologies used. PWA, React Native, full native, it doesn't matter. The issue is truly that these large companies have horrible, bloated engineering teams and that bloat comes through in the size of the apps produced. It is Conway's Law in action.

[1] https://itunes.apple.com/us/app/discord-chat-for-gamers/id98...

[2] https://itunes.apple.com/us/app/slack-business-communication...

[3] https://itunes.apple.com/us/app/tweetbot-4-for-twitter/id101...

[4] https://itunes.apple.com/us/app/twitter/id333903271?mt=8

Re: App sizes are out of control

#117
post #94
post #73

Earlier quoted context omitted.

Depends on the language. If you're using something like C++, you can probably remove a lot of dead code. But with more dynamic languages, like Objective-C or Ruby or JavaScript, it becomes difficult or impossible to prove that a given chunk of code is never used. In Objective-C (which I'm most familiar with), the linker will keep all Objective-C classes and methods because it has no idea if you might be looking thing…

You could use static analysis to find out if anything calls objects dynamically by name at run time which could be a useful optimization. To be safe this would be one bool value for the entire code base, but with some care it would help. A larger issue is size is simply not considered a significant issue.

With Objective-C, that will always come back "true." Even if you never use dynamic lookups, Apple's frameworks do. I suspect the same is true of other languages.

Re: App sizes are out of control

#118

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?

https://developers.google.com/web/progressive-web-apps/

Re: App sizes are out of control

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

Why vectors can't be pre-rendered and cached?

Re: App sizes are out of control

#120
It's pretty rich how these companies are well known for the rigor they apply to interviewing candidates on technical subjects, yet actually drop the ball in production with poor engineering like this. Where does that rigor go after the interviews are done?

Are there any examples of well-known apps from large organizations that aren't excessively large in size?

Post reply on HN