41

When creating an emulator device, the option Emulation Options makes me confused. What do Snapshot and Use host GPU mean?

enter image description here

enter image description here

enter image description here

41

The Snapshot option speeds up the boot of the emulator by saving a snapshot of its RAM once it has booted, and restoring from that snapshot on future uses. That way, it doesn't have to run the boot process (which is slow, because it's emulated) every time you start the emulator.

The Use Host GPU option uses the host computer's OpenGL implementation (which is probably hardware-accelerated, on your real GPU) to evaluate OpenGL commands inside the emulated system. Put another way, when a program inside the emulator uses OpenGL for graphics operations, the work goes out to your real GPU, and the result goes back into the emulator, instead of emulating a GPU (which is very slow). The result is a significant speed-up, especially when you consider that most view and canvas drawing uses OpenGL in Android ≥ 4, even in non-graphics apps.

You can't have both options turned on at once.

  • 1
    Which option would speed up testing a PhoneGap app (primarily consisting of Angular+Bootstrap) the most? – Micah Bolen Mar 13 '14 at 16:20
  • This depends on whether you want a faster boot or better runtime performance for the emulator. Snapshots allow you to boot almost instantly but Host GPU speeds up the emulation itself. – onik Mar 13 '14 at 18:21
  • @Micah-psIloveyou If you have a follow-up question, the best way to get good answers is to post it as a new question. Nobody will see it buried in the comments. – Dan Hulme Mar 15 '14 at 9:32
  • @onik, Why couldn't both be combined? – Pacerier Jul 1 '15 at 10:36
10

The Snapshot option allows you to use a feature that's similar to the Hibernate function in Windows. It saves the contents of the emulator's memory to disk when you close the emulator, so that when you open it, it doesn't have to boot the OS, but instead it can load the memory contents from the disk and resume from where you left off. This allows you to start the emulator faster.

Use host GPU means that instead of using the CPU to render the graphics, it uses the computer's graphics card. This speeds up graphic-intensive processes. Details and requirements can be found on developer.android.com.

You should note that Snapshots and graphics acceleration are mutually exclusive, so you can't use both.

  • 2
    Which option would speed up testing a PhoneGap app (primarily consisting of Angular+Bootstrap) the most? – Micah Bolen Mar 13 '14 at 16:46
  • Usually in phonegap/cordova you keep the emulator running all the time and just re-deploy the apk to the emulator. I keep the GPU turned on. To speedup the startup time anyway I read that it is good to have a smaller sd-card image in use. – dawez May 20 '14 at 7:24
  • @onik, Why are they mutually exclusive? – Pacerier Jul 1 '15 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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