Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Slow Android performance

Is it just me or do apps run really slow in the Android emulator? Has anyone else seen this? Is performance the same when the apps are running on a device too?

Even the Kitchen Sink feel sluggish.

I'm using Developer 1.2.1, mobile SDK 1.3.0, Android SDK APIs 2.1 and screen WVGA800 if it makes a difference.

— asked May 19th 2010 by Dan Giulvezan
  • android
  • emulator
  • performance
  • slow
  • speed

6 Answers

  • I would like to share with you a few of my findings on speed. These may not apply to you but they certainly were causing my application performance to suffer.

    1) Having a lot of 'include' .js files on every window. Loading javascript is SLOW. We had a lot of javascript code for handling our data access layer. This was done in include files that we placed on every window. This took almost 2 seconds to load in the emulator (around 25k in javascript). Solution to this was to have the data access only in app.js and access the data through events from the child windows.

    2) Passing data through the window proxy is SLOW as it seems objects are copied each time you access them in the child window, they are not passed by reference. Solution here was to be more selective and only pass the data you need to the child window. I actually ended up using a custom event handler to pass data between windows as this also solves my problem with accessing and updating the data from the main window.

    3) Be very careful with your SqlLite databases. Largish tables (several thousand rows or larger) can take a while to query even with proper indexes.

    — answered May 19th 2010 by Vinh Bui
  • It really depends on the device. It's not snappy on the G1 or ION/My Touch, but much faster than 0.8 was. On the Droid and Nexus one it's fast. With the upcoming 2.2 it should be damn fast.

    The emulators tend to run a little slower to much slower than the actual device.

    — answered May 19th 2010 by Don Thorp
  • Phew! Very happy to hear that the emulators tend to run slower than the actual device. Was getting pretty nervous.

    Thanks, Don!

    — answered May 19th 2010 by Dan Giulvezan
  • Thanks for the great info, Bryan, really appreciate it. I have an app that runs well on the iPhone but it sounds like I'll have to make a few changes I hadn't planned on making to get the most out of the Android side.

    — answered May 19th 2010 by Dan Giulvezan
  • Even a simple test app with one lable, one textfield and one button is very slow on my emulator.
    Is that even normal?

    — answered January 18th 2011 by Bjorn Seigers
    • That depends on your machine, how much memory is available, etc. Performance on device is much better than the emulator in general.

      — commented January 18th 2011 by Don Thorp
    • From my own personal experience it also boils down to:

      How much content is being assigned to a Window…
      The code (async, not-async, event handling, etc) that applies to each window…
      IMHO, if you see things in the emulator, they may very well exist on the actual device (such as 'screen jitters' during rendering), but may be less apparent due to the actual device running your code natively.

      Just my thoughts on my search to speed up tableView simplification and what-not.


      — commented August 22nd 2011 by Jesse Benedict
  • I found titanium studio development for android applications very attractive but a bit disappointed by slow android emulation. Suggest to to create a time stamp on the emulator data log dump and fix the process that is taking too long. As a test developer myself, normally this is what I do cut down test time to optimize test scripts in my job. Just a suggestion.

    — answered January 1st 2013 by francis clemente
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.