Reducing the size of Titanium based Application

You must Login before you can answer or comment on any questions.

1) How can we reduce the size of a Titanium based Application? My Application whose Resources Files are just about 800 Kb, generates around 5.7 MB sized App in Debug mode and 5.2 MB in Release mode? What could be the problem?

2)When I checked the generated Xcode project, it seems that around 18 frameworks are included in it, where I need only two frameworks in case if I develop in Native mode with out Titanium. I tired removing those frameworks from my Project, but started getting errors. What is the right procedure to remove those frameworks which I don't want?

— asked 2 years ago by Radhakrishnan Selvaraj
2 Comments
  • Does Appcelerator people don't have an answer? If I could have done this app in iPhone and Android, I would have done the app with a maximum size of 1 1.5 MB.

    — commented 2 years ago by Radhakrishnan Selvaraj

  • The size I intended was 1.5 MB.

    — commented 2 years ago by Radhakrishnan Selvaraj

2 Answers

The Titanium build scripts try and analyze your source code and optimize the generated binary to only include the Titanium modules that are necessary. However, it does remain the case that our binaries are much larger than native binaries, since we need to ship our platform code and a JavaScript interpreter with the application. We know this remains an issue and are always looking for ways to optimize our binary creation to make the product as small as possible. As an end developer, unfortunately, there isn't a lot you can do (in your JavaScript code or otherwise) to improve this situation.

If you have some knowledge of the native SDKs and would like to hack Titanium a bit to see if you can improve the binary size, by all means fork away - we'd be happy to process a pull request with improvements!

— answered 2 years ago by Kevin Whinnery
answer permalink
1 Comment
  • Kevin,

    Thanks for the response.

    What is your take on the Frameworks included in the App? Even when I am not using any of the Audio APIs, would the Audio Framework be added?

    "The Titanium build scripts try and analyze your source code and optimize the generated binary to only include the Titanium modules that are necessary."

    Does this refer to Frameworks that I refer to or specific modules in Titanium?

    — commented 2 years ago by Radhakrishnan Selvaraj

"Since we need to ship our platform code and a JavaScript interpreter with the application" -- Why not separate these from the actual app executable, and install only if they are not in the target device, kind of like a framework.

— answered 10 months ago by Rodrigo Vega
answer permalink
1 Comment
  • That makes appstore and google play to work with Ti so that they can distribute Ti frameworks before a Ti based app is installed when those frameworks are missing. And I don't think that would ever going to happen unless Ti framework becomes huge like Java or .Net

    — commented 9 months ago by Eugene Jo

Your Answer

Think you can help? Login to answer this question!