[TIMOB-11319] Studio : Apk file size varies in 2.1.3 and in 3.0 build of SDK
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2012-10-10T23:59:54.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | 2012 Sprint 21 Core, 2012 Sprint 21 |
Components | Core |
Labels | qe-and100112 |
Reporter | Pragya Rastogi |
Assignee | Bill Dawson |
Created | 2012-10-09T10:12:56.000+0000 |
Updated | 2013-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
File | Date | Size |
213.zip | 2012-10-10T12:18:57.000+0000 | 5884634 |
3.0.zip | 2012-10-10T12:18:31.000+0000 | 6000376 |
MyTestApp.zip | 2012-10-10T12:18:31.000+0000 | 3694974 |
Environment used is same for 3.0 and 2.1.3.
ACTUAL APK FILE SIZE DIFFERENCES
6060842 - APK 3.0.0 5943795 - APK 2.1.3 ------- 117047 bytesINVESTIGATE 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.