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.
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.
-
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.
-
Phew! Very happy to hear that the emulators tend to run slower than the actual device. Was getting pretty nervous.
Thanks, Don!
-
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.
-
Even a simple test app with one lable, one textfield and one button is very slow on my emulator.
Is that even normal? -
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.