Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10394] Android: Two versions of V8 are shipped

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2012-08-10T19:54:39.000+0000
Affected Version/sRelease 2.0.2
Fix Version/sn/a
ComponentsAndroid
LabelsSupportTeam
ReporterPedro Enrique
AssigneeNeeraj Gupta
Created2012-08-10T09:27:29.000+0000
Updated2017-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

FileDateSize
Hello World.apk2012-08-10T11:08:56.000+00005785759
Screen Shot 2012-08-10 at 12.22.41 PM.png2012-08-10T09:27:29.000+000034522

Comments

  1. Michael Belkin 2012-08-10

    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!
  2. Josh Roesslein 2012-08-10

    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.
  3. Bill Dawson 2012-08-10

    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.
  4. Marcus Olovsson 2012-08-10

    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.
  5. Neeraj Gupta 2012-08-10

    Duplicate of TIMOB-7474.
  6. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source