[TIMOB-685] Android: Minimize APK
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:55.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M04 |
Components | Android |
Labels | android, defect, enterprise, release-1.6.0, rplist |
Reporter | Don Thorp |
Assignee | Marshall Culpepper |
Created | 2011-04-15T02:34:24.000+0000 |
Updated | 2011-04-17T01:53:55.000+0000 |
Description
Several things to consider
- Make sure modules aren't linked in if not used.
- Create minimal js.jar
- Have dependency detection between modules (requires extending module project)
- Use js compiler where possible
See this http://developer.appcelerator.com/question/8511/how-to-optimize-for-pacakge-size"> Q&A
Comments
- ryanchan 2011-04-15
I want to confirm if this issue only related to Android?
How about iPhone?
- Don Thorp 2011-04-15
We use different tickets for each platform. iPhone is already minimizing it.
- John Veldboom 2011-04-15
Any update on this? I've received a couple of negative feedbacks from users in the marketplace due to the file size being large.
The APK is just under 1MB, but when installed it's over 3MB.
- Don Thorp 2011-04-15
This is being done as part of our 1.5 release. We do not have a firm release date yet.
- Marshall Culpepper 2011-04-15
(from [6dbf78c86cfa3b48320b786a7a026c714d321e21]) a new smalljs.jar that includes everything needed for JS compiling, we now compile / ship with the smalljs.jar on device, and compile with js.jar [#685 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/6dbf78c86cfa3b48320b786a7a026c714d321e21"> https://github.com/appcelerator/titanium_mobile/commit/6dbf78c86cfa...
- hal 2011-04-15
Marshall
Does this optimization address excluding images that aren't required, as per http://developer.appcelerator.com/question/83571/zipalign---is-it-built-into-titanium"> this concern in the Q&A? Although, I'm not sure if this is possible. Would you mind clarifying? Thanks
- hal 2011-04-15
Marshall - ignore my last post - Don answered it for me.
- Thomas Huelbert 2011-04-15
Marshall, from osx (api 7) and Titanium SDK version: 1.5.0 (12/08/10 08:34 4ee1205), when creating a minimal project I get 4.85MB
1.new project > mobile, give it required info
2.install to device and check the size (by way of settings> manage applications)results: 4.85 MB
- Thomas Huelbert 2011-04-15
1.4.1.1 same test yields a 2.86MB (uncompressed on device)
- Don Thorp 2011-04-15
Should not have been in M01
- Marshall Culpepper 2011-04-15
(from [b2aae2b86035fd5479430aa25deeb0b11536d51c]) Merge branch 'master' of https://github.com/taazza/titanium_mobile">https://github.com/taazza/titanium_mobile into taazza-master [#685] https://github.com/appcelerator/titanium_mobile/commit/b2aae2b86035fd5479430aa25deeb0b11536d51c"> https://github.com/appcelerator/titanium_mobile/commit/b2aae2b86035...
- Marshall Culpepper 2011-04-15
(from [a843cf5fbb88612f73da03f398659568cc6b8d3f]) extract all binding strings into constants, speeding up initial binding time and slightly lowering bytecode size [#685 state:fixed-in-qa]
https://github.com/appcelerator/titanium_mobile/commit/a843cf5fbb88612f73da03f398659568cc6b8d3f"> https://github.com/appcelerator/titanium_mobile/commit/a843cf5fbb88... - Thomas Huelbert 2011-04-15
[INFO] Titanium SDK version: 1.6.0 (01/10/11 08:25 3452f06)