Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11319] Studio : Apk file size varies in 2.1.3 and in 3.0 build of SDK

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2012-10-10T23:59:54.000+0000
Affected Version/sRelease 3.0.0
Fix Version/s2012 Sprint 21 Core, 2012 Sprint 21
ComponentsCore
Labelsqe-and100112
ReporterPragya Rastogi
AssigneeBill Dawson
Created2012-10-09T10:12:56.000+0000
Updated2013-03-13T18:56:57.000+0000

Description

This is a Regression issue. Size in SDK 2.1.3 is 5.9MB Steps To Reproduce: 1. create a default app. 2. Distribute app on Android device. 3. Verify its apk size. Actual: In 3.0 SDK build, size is 6.1MB for V8 whereas in 2.1.3 its 5.9MB Expected: Size must be similar in respective builds.

Attachments

FileDateSize
213.zip2012-10-10T12:18:57.000+00005884634
3.0.zip2012-10-10T12:18:31.000+00006000376
MyTestApp.zip2012-10-10T12:18:31.000+00003694974

Comments

  1. Pragya Rastogi 2012-10-10

    Environment used is same for 3.0 and 2.1.3.
  2. Bill Dawson 2012-10-10

    ACTUAL APK FILE SIZE DIFFERENCES

    6060842 - APK 3.0.0 5943795 - APK 2.1.3 ------- 117047 bytes

    INVESTIGATE DIFFERENCES

    Two new drawables

    btn_check_buttonless_on_64.png = 3832 btn_more_64.png = 5765 ---- sum new drawables (already compressed): *9597*

    libkroll-v8 size changes

    armeabi: 5546988 (3.0.0) - 5502148 (2.1.3) = 44840 delta armeabi-v7a: 5523500 (3.0.0) - 5479832 (2.1.3) = 43668 delta ---- sum delta is 88508 the .so files compress about 61%, so keep only 39% of that delta: *34518*

    classes.dex size changes

    1640000 (3.0) - 1443124 (2.1.3) = 196876 delta classes.dex deflates 56%, so keep only 44% of that delta: *86625*

    Sum of all compressed deltas:

    9597 + 34518 + 86625 = *130740*

    DISCUSSION

    APK File size growth was 1.97%

    libkroll-v8 will always grow as we add new features. There are two copies of it (one for each architecture). It grew by 34K (compressed) this time. This is to be expected.

    classes.dex will also always grow as we add new features. Also any other java libraries we include will end up in there. For example, we had to update to the latest version of Google's android-support-v4.jar to support some accessibility features. Classes.dex grew by 87K this time. This is to be expected.

    Two new drawables were added to support higher densities. Naturally this contributed to file size growth.

JSON Source