[Discuss] Nexus 5X

Matthew Gillen me at mattgillen.net
Thu Oct 1 20:00:42 EDT 2015


Looks like I was wrong, both the ones I looked at had significant usage
of Android layouts (which is what you use if you are using the built-in
UI constructs).  Internationalization takes up nontrivial amounts of
space too.

Unzipped bare apks:
Boston Globe: 15M
Twitter: 49M
------
[globe]$ du -sh *
20K	AndroidManifest.xml
1.4M	assets
2.4M	classes.dex
3.1M	lib
132K	META-INF
6.7M	res
876K	resources.arsc
-------
[twit]$ du -sh *
76K	AndroidManifest.xml
652K	assets
4.4M	classes2.dex
7.2M	classes.dex
2.1M	com
20K	fabric
2.3M	lib
1.2M	META-INF
24M	res
7.7M	resources.arsc
4.0K	robolectric.properties
-------

What are those things?  For those unfamiliar with Android development:
o   assets - typically single-size images; in the case of the globe app,
a handful of jpgs used in their in-app user's guide
o   classes.dex - the actual code.  I'm guessing twitter embedded a
javascript engine of some sort.  The reason twitter has 2 dex files is
because older versions of android had a limitation in the binary dex
format that a single file could only have 65k methods+resources in it.
It turns out if you include some apache-commons libraries you can hit
that limit pretty quickly.
o   com - this is a data directory twitter has with some google
phone-number stuff with internationalization.
o   lib - native libraries.  Twitter has a single library called
libtwittermedia, but they have 3 copies of it (arm, armv7, x86).  The
Globe has three libraries, and doesn't support x86: libodyssey.so
libopencv.so  libsearch.so
o   res - icons, layouts, and internaltionalization.  png files in 'res'
are typically included in multiple resolutions so that the app doesn't
have to downsample at runtime.  This is also where the UI layouts go, as
well as all the internationalization files.

Matt

On 10/01/2015 08:26 AM, Matthew Gillen wrote:
> On 9/29/2015 3:45 PM, Kent Borg wrote:
>> On 09/29/2015 03:22 PM, Shirley Márquez Dúlcey wrote:
>>> One word on why an app needs 100MB: games. All those visuals and
>>> sounds take up space.
>>
>> Yes, sampling reality with pictures and sound recordings is expensive,
>> and making up an artificial reality also takes up space.
>>
>> But why does my Kindle app need 125MB, not counting books?
>>
>> Why does the Wall Street Journal need 20MB just for the app? (Not data.)
>> Boston Globe: 18MB?
>> Chrome browser: 67MB?
>> Firefox: 52MB?
>> TuneIn Radio Pro: 53MB?
>> Google Hangouts: 54MB?
>> Twitter: 51MB?
>> Kayak reservations program: 40MB?
>> Calendar: 36MB?
>> Gmail: 37MB?
>> FlightView Free: 29MB?
>> Wordpress client app: 27MB?
>>
>> For all of these I am not counting what is reported as "Data" or
>> "Cache",  these are just the "App" numbers.
>>
>> These seem like crazy big numbers to me. It looks to me like these apps
>> are growing to fill space. And now that the .apk file limit has doubled,
>> I am assuming many of these numbers are set to double, because they can.
> 
> You've got me curious enough that I'm going to pull some of these apps
> down and pull them apart to see what they have in them, but my initial
> guess is that they're all embedding some sort of cross-platform UI engine.
> 
> All of these organizations want iOS and Android apps, and they want to
> minimize costs of application development, because that's pure overhead.
>  So they're probably using some sort of framework to make a UI
> consistent across platforms.  So the size probably comes from them using
> very little of the built-in UI constructs.  Even if it's not a UI
> framework specifically, my guess is that it's a ton of third-party
> libraries.
> 
> The other thing that tends to take up space is the icons/resources.  It
> makes sense for a lot of these apps to bundle all the icons into the app
> so they don't need to be pulled from the web all the time (keeps the app
> responsive even in low-bandwidth situations).
> 
> I'll try to find time today to pull apart a few of those apps to really
> find out though.
> 
> Matt
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://lists.blu.org/mailman/listinfo/discuss
> 




More information about the Discuss mailing list