Live data from Hacker News

App sizes are out of control

trevore.com

341–350 of 455 posts

Re: App sizes are out of control

#341
post #210

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.

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.

Nobody said arbitrary sizes. It's still a limited set.

Re: App sizes are out of control

#342

Earlier quoted context omitted.

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". Havin…

> I'd rather see 50 little files like libleftpad.o than 5 gigantic libraries. And then you'll have to use software written in 50 different styles, with 50 different type and error conventions, with pieces that couple together or not at random.

Right, and most people could have much more free space on their phones (or, more apps). I'd much rather write some glue code than ask my users to dedicate 275 MB to install my app, not even counting cached data or anything else. There's a reason many of my friends and I have deleted apps like LinkedIn - it's not that we don't like them, it's that the the apps were too big for the little value they gave us, especially when considering the web versions give us almost all the same capabilities, and only cost a couple KB of persistent storage (cookies + history + maybe some localStorage or whatever).

Re: App sizes are out of control

#343
post #38

Awesomely, this blog post of less than 200 words and one screenshot loads over 1.41 MB for me. Software expands to fill all available resources.

For the few among us who haven't read "The Website Obesity Crisis", this is as good an excuse as any to link it again: http://idlewords.com/talks/website_obesity.htm

The only issue I have with that site is that it's awful to look at.

Re: App sizes are out of control

#345
post #288

Earlier quoted context omitted.

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.

Really? I've never heard that before. I'd guess it would be bigger if anything. Any idea why that is?

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

#346
post #210

Earlier quoted context omitted.

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.

I would have said exactly the opposite: blurred strokes belong to bitmaps, you are still thinking that pixels are square over a regular area that can opnly be rotated by multiples of 90 degrees. SVG graphics are clean, result in NO blur at all. They don't even need any Truetype-style hinting. You've probably looked only at early non-conforming implementations using bad approximations. But precise rendering algorithms…

Truetype hinting serves to distort the curves beneficially (by being aware of the pixel grid) in order to produce more readable output at low resolutions. SVG graphics do not automagically scale down and stay readable.

The classic easiest to explain in words case is taking a capital letter O and turning it into more of an "elongated stop sign" shape at around 6 pixels of width. There is a tradeoff between remaining faithful to the original shape and creating high-contrast, readable shapes at low resolution. There is nothing impossible about scaling down the vector outlines of a TrueType font in a mathematically perfect way. You still need the hints to make the result more readable.

(I worked on the hinting software for 13 of Apple's System 7 font faces and about 3/4 of Windows 3.1 launch fonts.)

Re: App sizes are out of control

#347
Apps need idempotent incremental recompilation that doesn't rewrite the whole executable or bundle. This may mean major changes to Apple LLVM, in terms of bitcode and binary object generation.

Furthermore, app developers need to:

- use thinning and slicing correctly

- remove extraneous files

- optimize assets: resolution, compression, minification

Re: App sizes are out of control

#348
post #108

Earlier quoted context omitted.

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.

Interesting talk. If he's right, then a Photoshop clone ought to be doable. 30k LOC is doable for a single person or a small team. I'm guessing that even with generics, it wouldn't help that much. Also, I think there are probably a lot more algorithm LOC in Photoshop than he thinks...

Re: App sizes are out of control

#349
post #26

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…

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.

As I understand it, when you link your binary, the linker will only include the used parts of the libraries. Linking to a 10M library but calling only one function will not increase your binary size by 10M, probably just a few bytes.

Re: App sizes are out of control

#350

Earlier quoted context omitted.

I used to work at a shop that ran a 1.5 mbps dsl line, and a ~5 year old, cheap, slow computer. If their code worked on that, it would work on any of our customer's machines. I wish devs would still test like that. Sure, your app works fine in downtown SF on the newest phone, but try using it in Nowherseville, TN, on a phone that is more than a couple years old. I bet a lot of user frustration comes from dealing with…

> Sure, your app works fine in downtown SF on the newest phone, but try using it in Nowherseville, TN Granting that you heavily imply a 4G connection, the choice of "Nowherseville, TN" is extremely interesting: Chattanooga, TN — which as a Tennessean I feel is essentially "Nowheresville" to most non-Tennesseans — has Internet service multiple orders of magnitude better than most of the Bay Area[1]… [1]: https://www.w…

I can agree that may be a bad example, but I think the point is fairly clear.

I do not, however, mean to imply a 4g connection. Many people don't even get that.

Post reply on HN