Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'm running Eclipse Helios on Windows 7 x64. I have a Core 2 Duo 2.0 Ghz with 4.0 GB which I think should be enough, since I've never have any performance problems with other developing tools.

When I run my first app on the Android Emulator (both 2.3.3 and 3.0) it took at least 5 minutes to load the OS and at first it didn't even run the HelloAndroid app. Even when I managed to run the application, the performance was unbearable.

I've tried various things to improve the performance, but no major improvement is shown. I think I'm missing something.

Things I have tried:

On AVD Manager

  1. Device RAM size to 512.
  2. Resolution to 640 x 480.
  3. Snapshot enabled.

On Project preferences\Android

  1. \Launch\ -cpu-delay 0 -no-boot-anim -cache ./cache -avd Android3

Things I can't tried: - Deploying on a device (don't have any).

By the way, I've had the same problem on a MAC Mini 2.66 GHz 2 GB but these settings made the difference.

Anyone can give any tips to improve this lame performance?.

share|improve this question
    
Get a quad-core with hyperthreading @ 2.8 GHz and an insane video card. Heh. But seriously, the emulator is slow. Generally speaking, emulation is always slow unless your hardware is an order of magnitude more powerful. I don't think you're going to get it working much better than you already have. –  Matthew Read Apr 7 '11 at 4:15
6  
Actually, the emulator doesn't support multiple cores (yet). So clockspeed really matters. Even on my new dev machine, I have performance problems, especially with honeycomb. I'm talking about the latest i7 quad core, 8 gb memory and a solid state hard drive. –  Bryan Denny Apr 7 '11 at 11:27
    
Ha, so my old 3.0 GHz Pentium 4 should run it better (with nothing else major in the background)? Crazy. –  Matthew Read Apr 7 '11 at 13:21
    
@Bryan Denny Even though the emulator doesn't multithread, giving it multiple cores helps shift the workload to less used cores, but this decreases stability, resulting in periodic crashes. So it's a speed/stability tradeoff, but I prefer to use all cores for speed. –  onik Aug 30 '11 at 12:19
add comment

3 Answers

Honeycomb (3.0) is notoriously slow in the emulator. You could try to get most of your functionality working for the phone first, to minimize using Honeycomb.

There are some BIOS settings to enable virtualization support in your CPU. I think turning these on may speed up the emulator, but I'm not sure. (The exact names for your system I don't know, but they'll have "virtualization" or "vt-x" or something in the name.

You could also try dedicating a processor to the emulator. You can change the "processor affinity" for processes in Windows using task manager. If you change it so that your emulator prefers one processor and your other main tasks (like eclipse) avoid that processor, you may see some gains. If your processor is hyperthreaded, make sure that you treat the two virtual cores as one core and assign the emulator to prefer both virtual cores.

(Finding the processes may be easier with ProcessExplorer because you can click the target button and then click a window and it shows you the process for that window.)


Update: See the Using Hardware Acceleration section on the Android docs to see how to use your GPU and virtualization support in your CPU to speed up the emulator.

share|improve this answer
    
Enhanced CPU instruction sets won't help speed up the emulator, because it's basically qemu which emulates an ARM CPU. –  Flow Nov 28 '11 at 10:47
    
Unless they help qemu process the ARM instructions at a faster rate. (So it can match the rate of the ARM.) Keep in mind that Honeycomb runs slower on the emulator than on a real device. Say ARM had SIMD instructions, but x86 didn't and instead it emulated them as serial operations. Enabling a SIMD CPU extension on x86 would solve that problem. That said, I don't know what the virtualization support does, except that it is intended to improve performance when simulating CPUs. –  pydave Nov 28 '11 at 20:25
    
Virtualization and emulation are not the same. –  Lie Ryan Nov 1 '12 at 6:16
    
@Lie: True, but that's beside the point: Intel/AMD's virtualization support (theoretically) makes the Android emulator faster. Someone is probably imprecise with their naming. (I'd guess the CPU support works for both virtualiztion and CPU emulation, so the CPU vendors aren't actually off the mark.) Heck, just because they're not the same doesn't mean they can't be combined in one system: "QEMU is a generic and open source machine emulator and virtualizer". –  pydave Nov 1 '12 at 23:23
add comment

The emulator is slow because it's an qemu that emulates a whole different CPU architecture as it's used by consumer PCs: ARM (vs. x86(_64) on your PC)

This means that every CPU instruction on the emulator's ARM CPU has to be emulated, which is per se slow. Also the emulator is AFAIK single-threaded. This means that speed-up can only be achieved by fast CPUs cores - multi-cores won't help here - and a reasonable amount of RAM.

share|improve this answer
    
Emulating a CPU tends to be slow, but the phone emulator is also emulating ARM and it's much faster. It's more than just the instruction sets. Honeycomb seems to be much more complex (and probably requires a more powerful ARM processor). GoogleTV is x86, so I wonder what its emulator performance will be like... (Whether they emulate x86 or run it as a native process.) –  pydave Nov 28 '11 at 20:29
add comment

You could try to use a third party emulator which by my experience, works very well. I'm not going to tell you that it won't lag from time to time, but take the trial and you will see how much better this emulator runs.

It's not a free application, but it's not expensive either. You can find it at YouWave Android Emulator. Give the trial a try and get back to us ;)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.