Live data from Hacker News

App sizes are out of control

trevore.com

201–210 of 455 posts

Re: App sizes are out of control

#201
post #169

Earlier quoted context omitted.

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.

Interesting, I find that surprising due to the overhead involved. In most languages calling functions via string names is very expensive. PS: Do you have an example?

> Interesting, I find that surprising due to the overhead involved.

Due to the frequency of this, objc_msgSend (which handles dynamic method calls) is hand-written in assembly, with caching and "fast paths" to improve speed. The overhead can usually be brought down to that of a virtual function call in C++.

Re: App sizes are out of control

#202
post #30

I never understand where this increasing size comes from. For videos or hi-res photographs, I understand. There is however no reason that code, either compiled to a binary format or in a textual format, uses so much data. Heck, the memoirs of Casanova spans 3000 pages, and is 6,5 MB. People don't understand how incredibly large a megabyte is for simple code. Surely the 275 MB isn't all useful data (I wonder what comp…

A huge chunk of that probably goes to, well, videos or hi-res photographs to be used in building the UI. Hi-res splash screens plus a bunch of hero images plus 2+ prerendered sizes of each display element for different pixel densities plus a dozen 30 second tutorial videos can easily add up to a couple hundred megs of assets alone.

Not for apps like Facebook. Their app binary is in the hundreds of megabytes.

Re: App sizes are out of control

#203

I tweeted some frustation about this a few days ago ( https://twitter.com/GregoryOriol/status/889859849353383937 ). What is surprising me, is that in the Facebook iOS app, there is a "FBSharedFramework.framework" that has a binary file of 215MB. What the fuck is this? How a single binary can get that big?

Facebook is THE mother lode of terrible engineering. They have turned it into an "art". You can see it across their end user offerings, as well as their open source ones. What is perplexing is that they have some of the most talented engineers out there. I'm guessing those people are using the resources of the company to research and do what is interesting to them, while clowns run the actual projects.

Re: App sizes are out of control

#204

One of my first jobs was as a technician at a tech support call center. For a while around 1997-1998, a good 1/3 of our calls were customers who ordered a new system with a hard drive over 2.1GB, but Windows/DOS could only make partitions as large as 2.1GB. Customers wondered why they got a smaller hard disk than they ordered, not realizing the extra space was that Drive D under My Computer. Fast forward to today, wh…

> my MacBook keeps nagging me that my "hard disk" (actually an SSD) is "full" because I only have 3GB of free space

That's because it will use that space for caches and swap, and you're preventing it from doing so and making the system slower.

Re: App sizes are out of control

#205

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…

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

#206
post #194

Earlier quoted context omitted.

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.

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 sec…

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

#207

Earlier quoted context omitted.

I was wondering why not use SVG (or any other vector file format) files and render all the graphic on the device, instead of including tons of PNG at various resolutions.

iOS vector asset catalogs (which use PDFs) actually don't support true vector rendering; any vector images are converted to PNGs at compile time.

As of iOS 11/Xcode 9 vector images are supported which is quite nice. It may still convert to PNG for backwards compatibility though, I’m not sure if App thinning discards the PNG for iOS 11 devices.

Re: App sizes are out of control

#208

Earlier quoted context omitted.

> Are there any examples of well-known apps from large organizations that aren't excessively large in size? This is nothing new. Look how much memory your typical Java desktop app, or worse, your average Java server app, uses. As soon as you have enterprises involved where it's regular occurrence for devs to be outfitted with the shiniest and beefiest (as perks or per standard company policy) developers won't care ab…

It's not that Devs don't care. It's because every metric anyone has ever gathered says that users don't care.

> It's because every metric anyone has ever gathered says that users don't care.

A lot of people go to wal-mart. Doesn't mean that it's a good thing overall for mankind

Re: App sizes are out of control

#209
post #87

Earlier quoted context omitted.

Not only, there is IMHO also a "technological supremacy" bias. Quite obviously most developers will have: 1) VERY powerful hardware 2) VERY fast (and unlimited) internet connection It's not like (they should do it as part of quality assurance or similar) they take a car, drive in some remote countryside, possibly in the middle of nowhere, stay there a couple days and try accessing their website (or running their app)…

This absolutely. I wouldn't be surprised if half of the outrage about file sizes simply comes from the fact that there are people who remember what software was like before all of this "technological supremacy" was a thing. People joining the workforce today didn't grow up with the experience of installing something off of seven floppy disks, which would have been considered an emormous program before the CD-ROM driv…

OT but not much, and JFYI, I started using an alternate unit of measure for web page sizes, the Doom:

https://twitter.com/xbs/status/626781529054834688

https://pbs.twimg.com/media/CLLGenwWgAAZAVv.png

Like: Hey, nice home page it is only 3 Dooms ...

Re: App sizes are out of control

#210

The situation is messy. Take Facebook.app. The reported size on the App Store is 377MB, the distributed .ipa is 241MB. But it is a universal app which includes fat binaries arm_v7 and arm64 and all the graphics 1x, 2x and 3x. App Thinning halves that size for end users. Yet the App Store reports the full size. There's more. App Store also provides some sort of delta updates [1], which save a lot bandwidth, but failin…

I was wondering why not use SVG (or any other vector file format) files and render all the graphic on the device, instead of including tons of PNG at various resolutions.

Because the experience is subpar when that is done. It is impossible to create a vector image that will result in clean, unblurred strokes at arbitrary small pixel sizes. Don't even suggest using TrueType-style hinting, I don't think any designer would want to touch that with a 10 foot pole.
Post reply on HN