tags:

views:

111

answers:

2
+1  Q: 

Working very slow

Hi guys,

My application connects to web server, downloads data (approximately 43000 Bytes) and do mathematics function (such as log, +, -, * etc...) on each byte.

To prepare apk file, it is just like publishing to android market. Turned off debug mode and deactivated all loggers.

Then put it to the web server and downloaded (installed) on my HTC device. After installation, I've tested the application. The time from beginning read bytes to end of task is approximately 4 minutes. It is very slow.

I've researched this part. It seems that is working slow on mathematics functions.

Is there any way to increase working speed ?

My code is same as iphone version of my application. It is very fast. All parts complete in 4 - 10 seconds.

What is wrong here ?

Or do I need to any configuration (related debug mode) ?

Please advice.

Thanks.

+4  A: 

I would suggest to benchmark raw math performance on both platforms.

Not all mobile CPU's have hardware FPU module, so complex math might be VERY slow.

Workaround is to implement math functions via integer calculations with limited precission - this could give you some 2-10x performance boost if it's really emulated math.

BarsMonster
+3  A: 

The first step in solving any performance problems is to identify them. You should profile your application to identify exactly where the problems are.

You can use the traceview tool to profile your application. Have a look at this question for instructions on how to use traceview.

Dave Webb