B4A optimized for Honeycomb?

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Erel - As you know, I posted a request for info on the Toshiba Thrive forum to see if anyone knew why the exact same routines in my (B4A) app run more than twice as fast on a 7" single-core 1G tablet with Android 2.2 than on a 10.1" Toshiba Thrive dual-core table with Android 3.1. I figured it had to be a hardware problem.

The only response that I thought remotely made sense is that B4A-generated code may not be optimized for a dual-core processor and/or Honeycomb. Could this possibly account for a 2x speed difference, or do you have any other ideas or suggestions?

The app is CardShark Spades running 100-deal simulations. If you want to try it yourself, the app starts up in the Options menu. All you have to do is push the buttons Replay, Okay, and Run Sims. It will stop after 100 deals. If you start with the same deal number, the 100 deals will be the same on different devices. The app does not show elapsed time, so you either have to start them at the same time or write down the times.
 

thedesolatesoul

Expert
Licensed User
Longtime User
There could be a difference in clock frequency of the two processors.
Also, if the architecture (ARMv6/ARMv7) is different it is very hard to compare.
Also, as Erel said there is the screen size overhead because the processor has to do more work. (Bigger bitmaps, more scaling, bigger framebuffers).
 

agraham

Expert
Licensed User
Longtime User
Having a dual core processor doesn't mean that applications will run any faster than on a single core. Android applications are mainly single-threaded and so can only be executed on a single core. I'm not really sure of the value of having extra cores on an Android device as owing to the architecture there is really only one application running and taking CPU time at any one time. I guess one core could be used by the OS background stuff and display rendering while the other ran the Dalvik VMs in which application execute.
 

Inman

Well-Known Member
Licensed User
Longtime User
Not sure if this would help but in the AndroidManifest file you can add <application android:hardwareAccelerated="true" ... /> in to the <application> element to enable hardware acceleration. But I believe you will have to compile with SDK API Level 11 (which is Android 3.0) instead of level 8 which is what we normally use.
 
Top