views:

910

answers:

1

The Android emulator is a bit sluggish. For some devices, like the Motorola Droid and the Nexus One, the app runs faster in the actual device than the emulator. This is a problem when testing games and visual effects.

How do you make the emulator run as fast as possible? I've been toying with its parameters but haven't found a configuration that shows a noticeable improvement yet.

+4  A: 

How do you make the emulator run as fast as possible?

Buy a faster computer.

The emulator is running actual ARM opcodes. It uses qemu, which is a virtualization system akin to a VirtualBox or VMWare, to accomplish this. That approach maximizes the fidelity between the emulator and real-world devices. Its cost is the ARM->Intel opcode conversion. The only way to significantly speed that up is to speed up the CPU that runs the emulator.

I have not done an exhaustive analysis, but I do not get the sense that qemu and the emulator use multiple cores. Hence, "a faster computer" is governed more by the speed of a single core than how many cores it has.

To the extent possible, I would develop "games and visual effects" on actual Android hardware, using the emulator for testing configurations that you do not own (e.g., QVGA). For example, I've done a reasonable amount of work on video playback apps, and I only bother developing those on hardware, because video playback (and presumably some games) requires graphics acceleration to work well, and qemu does not have a graphics accelerator AFAICT.

CommonsWare
Thanks CommonsWare. Very interesting answer. But isn't there anything you can do to improve the performance? Things like disabling all debug messages and such. Maybe there's an optimal configuration for performance.
hgpc