[TIMOB-10394] Android: Two versions of V8 are shipped
GitHub Issue | n/a |
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-08-10T19:54:39.000+0000 |
Affected Version/s | Release 2.0.2 |
Fix Version/s | n/a |
Components | Android |
Labels | SupportTeam |
Reporter | Pedro Enrique |
Assignee | Neeraj Gupta |
Created | 2012-08-10T09:27:29.000+0000 |
Updated | 2017-03-20T22:22:30.000+0000 |
Description
The Problem
A packaged app is way too big.
Reason
Two version of V8 are shipped with the app.
To reproduce:
1. Create a new Titanium Android app
2. Build for distribution
3. Change the app.apk name (extension) to app.zip
4. Uncompress the app.zip
5. Look inside the lib folder and you'll see two v8 folders
Attachments
Apk size is hugely important for google play's rankings and customer retention (many people delete the largest apps on their phone when storage is low). Titanium apps are always huge and a 5.5mb reduction would be extremely valuable. Really hoping for an update/fix for this soon!
TIMOB-7474 is a feature to allow selecting which ABI version to package with your application. This could be used to reduce the APK size if supporting only one ABI is acceptable for your application.
Most applications don't ship with a Javascript runtime. :) It is, of course, the very nature of Titanium that we have to do that. It's common practice to ship both the armeabi and the armeabi-v7a versions of a library because the latter can take advantage of newer chip architectures for (possibly) better performance. However armeabi (v5) is compatible with the newer chipsets (not vice-versa), so you could get away with shipping just armeabi. We have TIMOB-7474 to create that possibility. However, making use of that opportunity (to only ship armeabi) _could_ affect performance of your app on newer devices. If you want to do comparison testing, here is a modified version of builder.py for 2.1.1 (please backup the real one if you decide to use this). If you use this builder.py it will just package armeabi. Try it out and put your packaged app on a newer device and see if you notice performance degradation compared to the package that gets built with the shipped builder.py. With this modified builder.py you can also set an environment variable ANDROID_ARCH to either armeabi or armeabi-v7a (default, as I said, is armeabi). It will package only the one you choose.
When you say that "making use of that opportunity (to only ship armeabi) could affect performance of your app on newer devices", what kind of performance hits are we talking about? Will it still be faster than running with rhino? The rather extreme change in file size has made it hard for us to move beyond 1.7.X (hard to motivate the change for clients :/), so I'll definitely look forward to trying this out.
Duplicate of TIMOB-7474.
Closing ticket as duplicate.