How cpu and memory intensive is android development? - android

I've been programming for about two years (android and java for a few months), but I still don't really know what impact the processor (speed and cores) and the amount of RAM has on the "programming experience" (compilation time, responsiveness of tools, overall workflow, etc.).
(If I'm allowed) to be specific (otherwise ignore): I'm about to buy a 13" MacBook Pro and try to decide between the i5 (2,5 GHz Dual-Core) and the i7 (2,9 GHz Dual-Core) and find this hard.

I don't program in Android that often, or even use Eclipse regularly, but I know that in my old 1GB laptop, Eclipse takes forever to load and is very sluggish, while it loads pretty much almost instantly with my new 8GB, is almost flawlessly smooth. But the only difference in the two laptops are not just the RAM or the CPU though, the old laptop is spinning a 5400rpm disk platter while my new one uses solid chips.
Specifically with Android development though, you will be running the emulator and probably multiple instances of the emulator at the same time. These emulators are pretty memory hungry, and Eclipse aren't lightweight by any measures either. You never ever want swapping, swapping is only there for so the system doesn't start killing processes if it ever runs out of memory, but you don't want it to ever be filled with anything with day-to-day usage. If your system starts swapping, that's the sign that it's severely need more RAM.
In my personal experience, larger and faster RAMs generally contribute to responsiveness better than faster CPUs (though you still need to get at least a mid-range CPU); compilation is usually I/O bound (although this might be different depending on the codebase) so it's best if the OS can keep all the files you're currently working with in disk cache in the RAM, and for loading times you want a fast harddrive (or even better, an SSD; because fast harddrive is much noisier, much more vibrations, and battery hogs, which is sometimes acceptable for a desktop tower below your desk but not for laptop).
Another important consideration is power-saving features in the CPU and battery life if you're going to be using it on the way; the weight, the screen and keyboard size, the "feel" of the touchpad (is it too slippery, or too rough, etc; once you get used to it, touchpad is much faster and comfortable than the mouse since it's much closer to the keyboard). Don't just compare the numbers.

I have three development computers. One Dell Latitude with i7, 8GB ram and a SSD with Windows 7. The other is a 17' i7, 8GB ram, SSD Macbook Pro with OS X.
The last one is a old HP small form factor, Core2Duo, 2GB ram and a slow HDD.
All three are fine for Eclipse, and NONE will run the emulator as fast as I want to. The emulator is sluggish, even on a $3000 laptop - the difference between i5 and i7 won't be that huge.
If I were you, I would opt for the cheaper one of them, and invest in a decent Android phone for running the software.

Related

Inconsistent Android Performance

I'm currently running two emulators on two different computers. Both emulators are running the same application.
Specs for Computer A:
Processor - Intel Core i5 3230M CPU # 2.60 GHz
RAM - 6.00 GB (5.89 GB)
System - 64 bit
This computer runs two servers EasyPHP, Openfire, and a web browser.
Specs for Computer B:
Processor - Intel Core i5 2320M CPU # 3.00 GHz
RAM - 6.00 GB (5.89 GB)
System - 64 bit
This computer does not run much, other than android studio and the emulator.
Computer A is extremely laggy and experiences high values of
Skipped 516 frames! The application may be doing too much work on its main thread.
Computer B on the other hand not only boots the emulator faster but the application performances smoothly. Computers B application has more View objects than Computer As. I have tried using TraceView, but the output does not give me anything useful concerning the application. It mostly outs long run time for O.S functions such as Android.os.MessageQueue.nativepollOnce, Android.view.ThreadedRenderer and the like.
If the problem is a code and or view issue then why is Computer B not experiencing poor performance? Is there another way, other than TraceView/sysTrace, that measures code performance? Does using AsyncTask hurt performance more than a normal thread does? (I've been hesitant on using normal threads due to manual thread management)

Is the processing time on emulator more than than on a real device?(android, eclipse)

I am making an android app. When I run it on the emulator, which has 512 MiB RAM, a simple activity takes 3 seconds to complete. Will this time be lower on a real device, as 3 seconds is inacceptably long! If it will be lower then by what factor( an estimate will do)? Thanks.
It really depends on exactly what you're doing, but as a rule of the thumb, devices are much faster than emulators.
Emulators are slow because an entire ARM process architecture is emulated through software, which adds a (big) extra layer between the Android system and your computer's processor.
Trying using one of the x86 intel images for a faster emulator closer to device speeds.
However, no emulator will give you the same speed as a device.

Will a faster video card improve the performance of the Android emulator?

This is a general question. I am trying to create apps for Google TV using the 3.1 Honeycomb OS, which is not yet available on Google TV... Only on Android Tablets. I know that using a device is much faster, but I cannot use it yet.
Therefore, until later this summer I must use the emulator.
The video card on my computer is pretty weak, I do not know what it is at the moment, but I can tell you it was a bargain-bin card. I have 1.5G of DDR RAM, Win XP 32bit, plenty of storage, and almost nothing installed on the computer (I just wiped it this week).
If anyone thinks getting a new video card would improve my performance, please say so.
Getting a new video card probably won't help much, AFAIK. I have a notebook with 128MB discrete video RAM and a desktop with 512MB video RAM. Both have the same approximate single-core CPU speed (2.5GHz dual-core vs. 2.66GHz quad-core), and they have comparable Android 3.1 emulator performance.
While graphics are at the heart of the performance issue with the Android 3.1 emulator, it is unclear how much qemu uses hardware graphics acceleration, and the emulator itself has to do all its rendering using software, since it does not have access to the underlying actual hardware.
If you only have, say, $50 to spend, I'd bump up your RAM, so you can allocate 1024MB to the device RAM setting of the AVD. That is known to incrementally improve matters. It is still slow, but not as horrible.
Video Cards and Processor its really important to the emulator speed, i dont know what processor you have, so cant know for sure if only upgrading the Video Card will make a lot of diference but it will definitly be better that the performance you have now.

How to run HoneyComb emulator faster on Windows?

Is there any way to get the emulator work normally ?
Its still very slow and useless, I tried adjusting the cache size and Ram.
My system configuration is quite good, are there any tips and hints to speed up the avd ?
Not much you can do, but Al Sutton lays out some things that can help a bit.
http://blog.alsutton.com/2011/01/27/the-android-honeycomb-preview-emulator/
For serious development, you'll need a Honeycomb tablet.
You may have heard the many complaints about how slow the Honeycomb emulator is. And indeed, the Android emulators have long been slow. Certainly slower than most phones. But Honeycomb is slower, so much so, that even Google engineers have admitted it makes more sense to develop testing on a real tablet.
Now my experience has been a little surprising: on my 1.6(?)GHz Pentium with 4G of memory running Win7, I have been surprised at how fast it runs. That is, I was prepared for the worse, yet found the response time to taps surprisingly reasonable.
That said, it is still noticeably slower than the 2.2 emulator. But not as slow as the real hardware we had to suffer with in the 80s;)
Finally, not only the emulator, but the whole SDK (including that memory hog Eclipse) become a LOT more usable when you have at least 3.5G of memory available. This means a 4G stick. When I was trying to run the 1.6 SDK under Linux with only 2G, it was frustrating how often Eclipse locked up. But with 4G, it is fine. So upgrade your memory to at least 4G before you worry about other measures, such as faster CPU.

Performance of app on Android Phone Emulator vs Actual Device?

I am working on a compute intensive app for Android. I do not have any device yet to test performance. However, the performance on emulator is a bit slower than expected.
I see an old question about some estimation of emulator vs device. What are your experiences while developing apps with recent SDK Froyo/2.2. Is performance observed on emulator is slower than actual device.
Please share your experience and the specs of your dev machine and mobile devices, both.
Note: To get virtual device's CPU speed one can run cat /proc/cpuinfo from adb shell. How is this comparable to actual device's CPU frequency?
Processor : ARM926EJ-S rev 5 (v5l)
BogoMIPS : 240.02
From a CPU standpoint, the emulator tends to be slower than actual hardware, presumably due to the overhead of converting ARM bytecodes to x86 ones on the fly.
From a graphics standpoint, the emulator tends to be dramatically slower than actual hardware, because the emulator lacks hardware graphics acceleration (regardless of the quality of the host computer's video card).
From a disk I/O standpoint, the emulator tends to be faster than actual hardware, particularly on write operations. Flash writes can be very slow, depending on a wide range of criteria (wear leveling, percentage of the flash storage that is in use, etc.). Brad Fitzpatrick covered this topic in his Writing zippy Android applications presentation at the 2010 Google I|O conference.
From a network standpoint, the emulator can be faster than actual hardware, because WiFi or wired Ethernet hooked up to broadband will typically be faster than a mobile data connection.
Yes true the emulator is slower than a real device. I have quite a decent development computer and it still is slower.
Here are my specs.
CPU: AMD Phenom X4 940BE (3GHz)
RAM: 8GB Corsair (800MHz)
GFX: Nvidia 9800 GTX+
MBD: Asus M3A78T
HDD: WesternDigital Velociraptor SATA2 (10k RPM)
OS: Ubuntu Lucid Lynx 64bit
And still it is quite slow compared to a real device.
Quick answer. I have found the emulator to be slower than real devices, even on my relatively fast PC.
if you install a SSD (solid State Drive) that will help a lot. i can see that you cpu and ram are decent but the simulator is pretty heavy (lots of rendering .. etc) and a faster Disk can be very helpful.

Categories

Resources