Live data from Hacker News

How to speed up the Android Emulator by up to 400%

blogs.nuxeo.com

31–40 of 56 posts

Re: How to speed up the Android Emulator by up to 400%

#31
post #27

Someone should sell a usb dongle with an ARM chip on it that can run android using the emulator on your dev machine for display and input. Debugging on a phone is not so bad, but it's not quite as nice as the iOS simulator experience.

That's exactly the purpose for which I bought the Nexus S, the Nexus One, and the HTC G1.

They are the Google Reference devices. Admittedly, it's perhaps not as lean as what you're referring to, but as a testing sandbox, I've tried a lot of different phones, but nothing has worked as well, in a general sense, as the reference models.

Re: How to speed up the Android Emulator by up to 400%

#32
post #27

Someone should sell a usb dongle with an ARM chip on it that can run android using the emulator on your dev machine for display and input. Debugging on a phone is not so bad, but it's not quite as nice as the iOS simulator experience.

Android has been ported to the BeagleBoard, so half of that is already available. However, I don't know whether Android's GUI can run over X11/VNC or similar.

Re: How to speed up the Android Emulator by up to 400%

#33
post #17

Earlier quoted context omitted.

Sure, but to most developers the functionality of seeing their mobile application running on their desktop machine is "emulation". And they probably don't need true emulation, they just need to test their application

That depends on whether or not there are any bugs or quirks in Android x86 that may or may not be present in Android for ARM and vice versa.

As an iOS developer that seems like a moot point. There are device bugs that cannot be replicate in the simulator, but everyone knows that. That's why you need devices.

But for general everyday development, I much prefer the simulator - I can look at the result of a code change in under 5 seconds with a simple keystroke, and not even have to pick up a device off my desk. It's empowering to be able to tweak your UIs and see the results in almost-real-time. I cannot do that if I'm forced to push the app to devices every single time.

Not to mention the debugger runs a hell of a lot faster on the host machine than any device - for the vast majority of bugs that isn't based on device quirks, it makes them much quicker to isolate and resolve.

Re: How to speed up the Android Emulator by up to 400%

#34
post #10

Earlier quoted context omitted.

An core i5 with 8 GB of ram and a 7200 RPM 500 GB hard drive. Actually, it is closer to 70 seconds. Then the lag while attempting to use it is unbearable, it stutters, input is completely ignored, or it crashes randomly when we try to replicate that bug on an actual device we can't.

Wow. What OS?

Windows 7.

Re: How to speed up the Android Emulator by up to 400%

#35
post #17

Earlier quoted context omitted.

That depends on whether or not there are any bugs or quirks in Android x86 that may or may not be present in Android for ARM and vice versa.

As an iOS developer that seems like a moot point. There are device bugs that cannot be replicate in the simulator, but everyone knows that. That's why you need devices. But for general everyday development, I much prefer the simulator - I can look at the result of a code change in under 5 seconds with a simple keystroke, and not even have to pick up a device off my desk. It's empowering to be able to tweak your UIs a…

Sure my point is that this article is mistitled. They're not increasing the emulator speed 400%, they're switching to Android x86 and achieving speed ups. This may be a good thing to do but is entirely different from improving the speed of the emulator itself.

Re: How to speed up the Android Emulator by up to 400%

#36
post #29
post #26

I think any experienced Android dev will tell you, the best solution is to buy a bunch of used Android devices, plug them in, and publish to the device directly for testing. Wasting any time with the emulator or this "virtual machine" isn't going to cut it in the end anyway. The only time I fire up the emulators is to make sure my assets are scaling properly for the various screen sizes of devices I don't own yet.

As an Android dev, I have to say this is very true. Emulators either don't simulate or don't simulate well enough a lot of stuff that you really want to test, like picking up audio from a microphone, or getting your location from GPS. There are also a lot of device specific quirks that make code run differently on different devices, meaning if you really want to make sure your code runs everywhere you can't just get…

Try using the iOS simulator to see what you're missing. The development time is greatly reduced because you're not having to constantly wait for the app to be deployed on the phone. The differences between the simulator and the actual phone are quite minimal.

Re: How to speed up the Android Emulator by up to 400%

#37

This is another symptom of why Android development is such a pain. You have to jump through hoop after hoop after hoop just to get to the point where you can get actual work done. If a tool ends up wasting more time than it saves, it isn't a tool, it is an obstacle.

"Such a pain" as compared to what exactly? This will depend entirely on what it is that youre trying to do. In all my experience, Android is notoriously easy to develope on, being fully open-source the way it is. Try developing for iOS beyond a the basics and I think you'll come to agree.

I dont think its fair to call the emulator an obstacle, it just comes with limitations. After all, emulators are only designed to emulate, they can't replace areal device. A hammer is still a tool, its just not the appropriate tool when you're trying to assemble a clock.

Maybe its just time to upgrade your tools.

Re: How to speed up the Android Emulator by up to 400%

#38

This is another symptom of why Android development is such a pain. You have to jump through hoop after hoop after hoop just to get to the point where you can get actual work done. If a tool ends up wasting more time than it saves, it isn't a tool, it is an obstacle.

"Such a pain" as compared to what exactly? This will depend entirely on what it is that youre trying to do. In all my experience, Android is notoriously easy to develope on, being fully open-source the way it is. Try developing for iOS beyond a the basics and I think you'll come to agree. I dont think its fair to call the emulator an obstacle, it just comes with limitations. After all, emulators are only designed to…

Please don't put words into my mouth or make assumptions about me. I am primarily an iOS dev. An app I worked on won an Apple Design Award and multiple other apps are in the Top 5 paid apps for their category in the iTunes store. To say that I develop for iOS at a basic level is laughable at best.

XCode isn't perfect, but I don't need google for blog posts or spend hours writing scripts or messing with configuration files in order to get it into a usable state.

Being open source has nothing to do with how easy a platform is to develop on. All that means is that the platform's source code is available.

Re: How to speed up the Android Emulator by up to 400%

#39
post #29

Earlier quoted context omitted.

As an Android dev, I have to say this is very true. Emulators either don't simulate or don't simulate well enough a lot of stuff that you really want to test, like picking up audio from a microphone, or getting your location from GPS. There are also a lot of device specific quirks that make code run differently on different devices, meaning if you really want to make sure your code runs everywhere you can't just get…

Try using the iOS simulator to see what you're missing. The development time is greatly reduced because you're not having to constantly wait for the app to be deployed on the phone. The differences between the simulator and the actual phone are quite minimal.

What you're saying is true, but OTOH there is only one series of iPhones/iPad Apple has to worry about simulating whereas there are thousands of different Android devices, each potentially radically different than the next in terms of resolution, aspect ratio, cpu, device capabilities (gps, microphone, camera, etc).

Of course this diversity is both Android's largest blessing and its biggest curse.

Re: How to speed up the Android Emulator by up to 400%

#40

Earlier quoted context omitted.

What kind of Android? 3.1? the 2.3 emulators are much better than the honeycomb ones.

Honeycomb emulator is slower because of the 1280x800 resolution. Google mentioned at I/O that it seems the emulator lags from the lack of hardware acceleration, and they said it would come by end of the year I think. I wonder if it's ready for 4.0. It should be.

Honeycomb emulator is also much slower because more parts of the UI use 3d acceleration which the emulator has to, well, emulate in SW
Post reply on HN