Android: what profiling tools are available under Eclipse to look at scalability? - android

I am developing a piece of Java code to be run on Android. I did some testing to see how well it scales. I first ran the code on a Windows desktop and then on a 4.0 Android device. The latter scales very very poorly compared to the former. I need to figure out if there are some inefficiencies in my code that cause this. What profiling tool/plug-in would you recommend to run profiling both on the device and on the desktop to compare apples to apples? Thank you.

I did some testing to see how well it scales.
The term "scales" is usually used to refer to servers, that have to "scale" to lots of simultaneous users.
What profiling tool/plug-in would you recommend to run profiling both on the device and on the desktop to compare apples to apples?
There is no such tool to the best of my knowledge.
If you feel that your Android code is not running efficiently enough, use Traceview to see where your hot spots are.

Related

How to predict performance of a program for smartphones developed on a pc

I am developing a program that is going to be very performance-intense for Android/smartphones. Because I do this on a pc (Windows) I do not really know how my application will perform on a mobile device. I do not want to port this program to android until I have a good working version for Windows (this will be my first Android-app and I don't want to try to troubleshoot something when I'm not even sure whether my program is working).
I am searching for some database where I can compare pc-GPUs with mobile GPUs. I know that an accurate comparison is difficult between such different architectures, however, a small hint about the expected performance would be very helpful.
By the way, I am developing on a machine with an integrated IntelĀ® HD Graphics 4400 and ideally, I want to compare it to something like an Adreno 306.
Rather than using benchmarks for the GPU, look at existing cross-platform applications with similar performance and see how it compares. Install it on your computer to make sure the intensiveness is similar (using whatever benchmarks you want), then install it on your android device to see if it can keep up to your expectations. You can find benchmarking apps or you can use the profilers on Android Studio to see how the device in question is handling the application.
This is about as good as you're going to get. Like you said, so much relies on the implementation and the vastly different architecture. Lastly, if you're building on a framework that builds to other platforms (libgdx, xamarin, etc), you should present a specific question to other users of that framework.

How to troubleshoot performance issues in Unity 3D

We have created a game in Unity and are currently testing on various devices.
Some devices as you'd expect perform better than others, but we are surprised by our testing on iPad 3 and iPhone 4, which we'd have thought would cope better. (simple movements of objects appear quite jittery)
With regards to troubleshooting we have placed a frame rate readout on the screen and we can see that this is very erratic (a target of 60fps can flick anywhere between 24 and 60 seemingly randomly), but I was wondering what other performance diagnostics can be done. Are there plugins that can give readouts/log performance as the game plays that could point to specific events or graphics that cause it all to struggle?
Any other ideas would be much appreciated.
Thanks in advance
Profile
Unity has some excellent tools to enable you to profile your code while it is running, both in the editor and on devices.
This generally involves:
Connecting your device to the same wifi network as your development machine, or plugging it in via USB cable
Selecting "Dev Build" and "Autoconnect Profiler" when you build your project
Opening the profiling window in Unity.
I would suggest that before you try profiling your application on your tablets, you try profiling it in the editor. This will give you an idea of how to best use the profiler, and you may realise what parts of code you can optimise before even running it on your device.
Profiler: http://docs.unity3d.com/Manual/Profiler.html
Read up on optimisation
Not so much an answer to your question, but read up on various performance gotchas. You don't want to prematurely optimise, but there are certain practices you need to be aware of when developing for mobile devices, keeping your shaders simple, reducing draw-calls, dynamic batching etc.
Various notes on optimisations:
http://answers.unity3d.com/questions/37293/general-ways-to-optimize-frame-rate.html
http://www.paladinstudios.com/2012/07/30/4-ways-to-increase-performance-of-your-unity-game/

Native code profiling on Android [duplicate]

I am developing a rather large software on Android with a log native code, it's working now but having some performance issues.
I am hoping I can profile each module(function call) of the software for CPU cycles, memory usage, etc, on several real android phones. Is there a simple c library to do that?
I see people using oprofile, It seems to be a overkill for my case since that it is a system wild profiler, and it requires rebuild the kernel and system image.
As I have the full source code of my app, all I really need is a simple c library that I can embed in my code to do some profiling while the app runs several test cases.
BTW, what is the Linux way of doing this?
I've had pretty decent results with android-ndk-profiler.
http://code.google.com/p/android-ndk-profiler/
Outputs /mnt/sdcard/gmon.out

Android software NDK native c code profiling on actual Android phones

I am developing a rather large software on Android with a log native code, it's working now but having some performance issues.
I am hoping I can profile each module(function call) of the software for CPU cycles, memory usage, etc, on several real android phones. Is there a simple c library to do that?
I see people using oprofile, It seems to be a overkill for my case since that it is a system wild profiler, and it requires rebuild the kernel and system image.
As I have the full source code of my app, all I really need is a simple c library that I can embed in my code to do some profiling while the app runs several test cases.
BTW, what is the Linux way of doing this?
I've had pretty decent results with android-ndk-profiler.
http://code.google.com/p/android-ndk-profiler/
Outputs /mnt/sdcard/gmon.out

Wine like for Android

I am pondering the idea of a Wine-ish compatibility layer on Android.
The idea is to run Symbian apps on it as both OSes share ARM hardware.
I have no knowledge of Symbian but I think that given the hardware capabilities of Android devices this could be done with less effort than Wine's windows emulation.
What would be the most significant difference to overcome in this emulator? (threading, storage, ...)
The real problem is not going to be code execution, but the API's to do things like graphics, interact with hardware, accept input, etc. If you have documentation of the original and android has the capability, API translation layers would be possible.
But android's security model outright prevents a number of things that are possible on other phone platforms, and combined with it's "java apis only" allows only inefficient means of doing things that can be done more efficiently on others.
This is of course all about application-level emulation/api translation. If you are willing to modify the android platform itself, supporting just about anything else for which you have documentation (and licensing?) within the hardware capability of the device should be possible.
Hardware capabilities of a device have nothing to do with complexity of an emulator to be hosted. It depends on Symbian's design and complexity.
And, even more, licencing. Even if one could make a Symbian emulator for Android, its legality would be questioned.
It's difficult to answer your question in detail, but since Symbian is open sourced (and Android too), if you've got the time, it shouldn't be too hard to see what sets them apart.
QT is used for the latest symbian OS, and has been ported to Android, you could write apps in QT build for each platform
the problem for writing an emulatir are variouss.
If the Symbian apps are written in in an interpreter language like Basic or similar then an emulator couldn't be too difficult to write. I did such stuff once to make the same code run on linux and windows, and I used a translation API for all calles coming from the software directed to UI, input/output.
I wound guess that the UI capabilities of Symbian are a subset of the Android functions so it would be not too difficult to write a WINE alike thing or an interpreter that runs the Symbian code on different hardware - IF it is only in high language.
But be aware there could be some machine code in the appps and that is processor specific. Most of the Android tabs nowadays run on Tegra, Tegra2 or (soon) on Tegra3, some may run on StrongArm or Arm, some may run on Intel Atom (x86 architechture), so this might get more or less impossible if the CPU isn't binary compatible like ARM / ATOM. Then you need to emulate the CPU as well and that might eat so much performance that you need a 4-5 times stronger machine to run that stuff smoothly.
It won't be too difficult to crack Android to execute Linux-alike binaries, but for sure this "mod" will affect the ability to use or download stuff from regular appstores.
With some apps you might have even more headache, e.G. my MP3 player from Korea runs on Strongarm, but it also executes Flash games from various sources. When there is no Flash player - and Google announced something like dropping support for Adobe Flash - it won't be usable.
The "most wanted" is obviously the Ovi Maps, probably that stuff could be easily converted to another app having offline navigation capability :-) People wrote "Gaia" some years ago, an open source viewer for Google Earth (and later forced to give up) so it can't bee too difficult to realize at least this.

Categories

Resources