News for hackers. Stuff that matters.
Re:App sizes are out of control by jarjoura on Tuesday August 01, 2017 @01:11PM (#14902954)
Those numbers are mostly unfair. For some reason in the iOS 10 App Store, Apple started listing the complete fat (both 32-bit and 64-bit archs) submitted .ipa size. If you want to easily test that, clear your cellular data usage, update one of those apps (or install) and then go back to settings and see the actual bytes transferred.

Also, most everyone is using Swift in some small part, so that automatically includes the standard library. Then you have some companies who switched to Realm DB away from CoreData. Or then there's a whole subset of companies that have decided they want to go all in on Javascript and have brought in the whole React Native stack with it.

These apps in that list are also built by teams of 100s of engineers working at full speed. In reality, each one is its own little OS full of its own UI frameworks, testing frameworks, and nontrivial code.

Trust me when I say that everyone is plenty aware of how big their footprint is getting, and no one is happy about it. Apple won't even let you submit to the store if the actual single architecture binary is over 60MB.

Re:App sizes are out of control by babesh on Tuesday August 01, 2017 @02:52PM (#14904049)
It’s partly unfair and only a partial picture. Many apps post install proceed to download data.

Some limit that amount of data they download but a few are indiscriminate about it. I hated the Yelp app because it seemingly did not limit how much space it took up. The more reviews you viewed, the more space it took up. I never found a setting to limit it. If you go to Manage Storage you will discover that many apps take over 100mb in documents and data.

Re:App sizes are out of control by ehsankia on Tuesday August 01, 2017 @01:55PM (#14903429)
I'm curious, does anyone have the equivalent app sizes on Android? I'd love to see a comparison, to see if this is more of a platform issue as mentioned in a few comments, or a developer issue.

I guess we also should be looking at the actual data transferred rather than the number shown on the store page.

Re:App sizes are out of control by MBCook on Tuesday August 01, 2017 @05:04PM (#14905295)
I'm 100% willing to believe this is a universal problem and is just as bad as Android. I'd be FLOORED if Android apps were significantly smaller.
Re:App sizes are out of control by tomerv on Tuesday August 01, 2017 @05:17PM (#14905443)
I checked now.

LinkedIn: 20.36MB Facebook: 76.59MB Twitter: 25.71MB

That's about 1/8th the size of those apps on iOS. Those are just the first three apps in use article, I'm sure the rest are about the same.

Re:App sizes are out of control by MBCook on Tuesday August 01, 2017 @05:21PM (#14905475)
Wow.

I wonder why it's so different.

Hopefully someone can chime in with the reason.

Re:App sizes are out of control by johncolanduoni on Tuesday August 01, 2017 @05:31PM (#14905572)
Java byte code is generally much smaller than equivalent machine code. If you use something like Multi-OS engine which statically compiles Java bytecode to native code for iOS it's fairly typical to see an order of magnitude difference in binary size.

This actually affects Android 5+ too (Multi-OS engine uses Android's AOT compiler) but since it happens on the device it doesn't affect download sizes.

Re:App sizes are out of control by MBCook on Tuesday August 01, 2017 @05:59PM (#14905775)
Really? I've never heard that before. I'd guess it would be bigger if anything.

Any idea why that is?

Re:App sizes are out of control by unholiness on Tuesday August 01, 2017 @07:38PM (#14906528)
It's true, Java bytecode was basically designed for small size. The goal was to transmit java apps quickly over the internet, a hope which mostly died off as JS took over, but which in some ways has been reborn with android (dalvik bytecode is somewhat different but is definitely small). The main tradeoff for the small size is a total lack of optimization until the JIT compilation stage.

But there's no way it's anything like a 10x difference. There's definitely something else going on here, like some quirk about how the app store is calculating the sizes of assets.

Re:App sizes are out of control by johncolanduoni on Tuesday August 01, 2017 @08:22PM (#14906768)
I'm talking about the binaries themselves as they are output from dex2oat. The 10x difference is I suspect a product of needing to compile parts of the standard library in addition to the app's code.
Re:App sizes are out of control by johncolanduoni on Tuesday August 01, 2017 @09:20PM (#14907107)
Many things that Java does with a single instruction take much more than that in the target architecture. For example, virtual calls (which are used almost everywhere in Java) take several instructions on x86 and ARM while only one in Java or Dalvik bytecode.
Re:App sizes are out of control by tybit on Tuesday August 01, 2017 @10:17PM (#14907385)
Bytecode is much closer to source code than machine code (there's a cool discussion about this in https://channel9.msdn.com/Shows/Going+Deep/Expert-to-Expert-...)

and source code is generally smaller than machine code.

Re:App sizes are out of control by kronos29296 on Wednesday August 02, 2017 @08:40AM (#14910033)
Its 174 MB installed with another 150 on Data which is a thing but I hardly use facebook once a day (just to see notifications not even the feed) which is quite big and no cleaner is going to delete the Data as it is not cache. Facebook app is a big one and I don't even know why.
Re:App sizes are out of control by deftturtle on Sunday August 06, 2017 @02:21AM (#14940027)
Pretty sure some android versions or phones let you delete the documents and data, whereas on iOS you have no freedom to clear the cache manually. It only happens when you run low on storage.
Re:App sizes are out of control by mtl_usr on Tuesday August 01, 2017 @02:01PM (#14903509)
I'm as far to mobile development as I can be but is there no shared libraries on those platforms ?

Other than the environment provided ones, isn't it possible to bundle some dynamically loaded libraries that can be shared by multiple apps ? Makes absolutely no sense for each application to implement it's own web browser/runtime.

Can't believe we are constantly reinventing the wheel again.

Re:App sizes are out of control by babesh on Tuesday August 01, 2017 @02:38PM (#14903892)
For iOS, there are the shared libraries provided by the OS. UIKit, PhotoKit, etc...

Shared libraries beyond that would bring the hell of version incompatibility. One need only look at Apple’s evolution of Swift where there still isn’t binary compatibility?

Most people don’t want to crack open their phone and set paths so that their app has a version of Python that works with it.

Also shared libraries can be giant security holes. See the bug in AFNetworking that affected many thousands of apps. Imagine an errant app shipping a backdoor into a shared networking library.

Re:App sizes are out of control by pandalicious on Tuesday August 01, 2017 @03:09PM (#14904257)
It's pretty telling that Linux distros are pretty much the only end-user platforms where binary distribution and packaging is built around shared libraries. Pretty much everyone else (Windows/OS X/iOS/Android/etc) generally expect binaries to include their own bundled versions of 3rd party libraries. Lots of people have looked at this problem and most have opted against the shared library approach.
Re:App sizes are out of control by marcosdumay on Tuesday August 01, 2017 @03:58PM (#14904706)
That's because Linux distros are more centralized that the Apple's walled garden. They just lack the walls, but are as much a garden as you can get.

Unless those platforms start distributing a huge number of libraries your software may decide do depend on, shared libraries won't take off on them.

Re:App sizes are out of control by justinclift on Tuesday August 01, 2017 @04:19PM (#14904901)
Not sure if "Linux distros" is the completely right term there. The various *BSD based "ports" systems do similar too.
Re:App sizes are out of control by custos on Wednesday August 02, 2017 @01:11PM (#14912482)
The Global Assembly Cache for .NET was supposed to be a shared library storage with support for multiple versions of the same library + signed assembly/hash matching.

It just never really took off for some reason. It's where all the BCL assemblies existed.

Instead we have NuGet and the libraries exist wherever the application is installed. GAC be damned :(

Re:App sizes are out of control by toast0 on Wednesday August 02, 2017 @02:44AM (#14908453)
If Apple (or Google) wanted to make this work, it wouldn't be that hard. An app could list the dependencies, with a name perhaps, but definitely a hash. The developer would have to upload the dependencies, too. If the hash matched, the server would also do a byte by byte comparison, and if that matched, mark the dependencies as sharable. When downloading an app with a sharable dependency, the phone would check if it already had installed it, otherwise download it and install it at the same time as the app. Refcount the sharable dependencies at install/remove/upgrade time and rove unused dependencies after a reasonable time.

You would only get a benefit if two or more apps you installed used the exact same version of the dependency, but that seems like it might happen enough; especially once it's expected to be in the ecosystem.

Re:App sizes are out of control by stickfigure on Wednesday August 02, 2017 @04:47AM (#14908955)
Sounds like you just invented https://nixos.org/nix/
Re:App sizes are out of control by on_and_off on Wednesday August 02, 2017 @05:39AM (#14909199)
Google is actually working on this for the support libraries. All the Android apps use them, so it is a good target (and of course it might be possible to extend it to other libs). I guess it makes the most sense in the markets where data is very costly. By itself the support lib is not really big but if each KB counts, let's not download it several times.
Re:App sizes are out of control by xg15 on Wednesday August 02, 2017 @05:03AM (#14909031)
> Shared libraries beyond that would bring the hell of version incompatibility

This is more a general question but I've never understand why so many shared library systems have the restriction of "only one version of a library". What stops you from storing different versions of the same library for different apps?

(I understand the problem with transitive dependencies - e.g. if the same app transitively depends on two different versions of a library, that might spell trouble. Even for this there are solutions - e.g. different classloaders for the jvm - but even without, you could disallow this special case witout sacrifying much)

Re:App sizes are out of control by babesh on Wednesday August 02, 2017 @09:08AM (#14910204)
For Apple libraries, it is because the latest framework could be providing a completely different implementation and they both want and need everyone on that implementation. For instance, they reimplemented Photos, introducing a new interface, maintaining the old interface but deprecating it.

Edit: in other words, common data.

Re:App sizes are out of control by mtl_usr on Tuesday August 01, 2017 @02:52PM (#14904053)
I guess they went as far as they could without a proper package manager.

> Shared libraries beyond that would bring the hell of version incompatibility. One need only look at Apple’s evolution of Swift where there still isn’t binary compatibility?

Since the source code is shared with Apple once it reaches the marketplace, wouldn't it be simpler for Apple to compile a specific version for whatever version of the Swift language is available on the target device ?

It wouldn't have any market value and wouldn't drive iOS devices sales but is would certainly slim them down a little.

> Also shared libraries can be giant security holes. See the bug in AFNetworking that affected many thousands of apps. Imagine an errant app shipping a backdoor into a shared networking library.

This sorta makes me like iOS a bit more. Memory gets cheaper but security doesn't get any cheaper when the dependencies grow.

Re:App sizes are out of control by babesh on Tuesday August 01, 2017 @04:16PM (#14904868)
Your source code isn’t shared with Apple. You ship Apple a binary or intermediate code.

Edit: Also doesn’t help if you have C or C++ code mixed in there.

Re:App sizes are out of control by saagarjha on Tuesday August 01, 2017 @02:38PM (#14903903)
> isn't it possible to bundle some dynamically loaded libraries that can be shared by multiple apps

Yes, there is one: the standard library, provided by Apple. However, many apps eschew this to use their own libraries and frameworks for whatever reason, be it ease of use or feature enhancements, and these cannot be shared.

Re:App sizes are out of control by stevenwoo on Wednesday August 02, 2017 @12:00AM (#14907804)
The Facebook API library provided by Facebook is notoriously huge in source code at least, and they're pretty proud of the size of it, can't find the link right now, but they had a blog post talking about it a few years ago ago.
Re:App sizes are out of control by lelandbatey on Wednesday August 02, 2017 @12:29AM (#14907933)
Here's a link to the oft-mocked slides from the talk where a Facebook engineer spoke about how iOS can't handle the scale of their app because they do the very logical thing of using over 18,000 classes: https://www.columbia.edu/~ng2573/zuggybuggy_is_2scale4ios.pd...
Re:App sizes are out of control by richardwhiuk on Tuesday August 01, 2017 @02:38PM (#14903900)
It would have to entirely app stored manage - it's not possible for iOS developers to currently share code between apps.

Everything that is shared between apps currently is stuff that's provided by the shared platform.

Re:App sizes are out of control by tomphoolery on Tuesday August 01, 2017 @02:27PM (#14903782)
> In reality, each one is its own little OS full of its own UI frameworks, testing frameworks, and nontrivial code.

Are you talking about React Native apps here as well?