• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Android executable performance

  • Thread starter Thread starter Yochai
  • Start date Start date
Y

Yochai

Guest
Hi,


We are looking for a consultant for android environment.


We work on rooted tablet and execute in the background a pure C++ native process. This process is a service that communicates with USB device and grab video images from it.


We also have an Android application which communicates with this process through JNI. It acquires video images from the device and displays them on screen.


We have some problems in this architecture that we have not found a solution yet:

1. We get strange freezes every few seconds (like every 10 seconds or so), it looks like the threads are getting starved. We have logs that show the processing stages, and every 10 seconds or so we see logs that indicate that threads “miss” a few frames.

This means the threads were frozen for about 100-200 ms.

I’ve tried changing the application “nice” level with renice. But it didn’t seem to help


2. We would like to execute this process as a system service (like in Linux). This process should be executed when the table is started and should start working when any client application tries to communicate with our device.


3. Ways to improve UI performance


4. The most effective ways to store a large amount of frames coming with a high frequency


5. The most memory and performance wise way to create , present and dispose a large amount of objects (or, more specifically, Bitmaps)
 
Hello there and welcome to our AndroidForums :).

Just a couple of thoughts for you that might help (in case you haven't thought about them before):

- I'm sure you've used logcat (adb logcat, etc.) and examined their messages.

- There are also kernel message (cat /proc/kmsg) that might reveal more details about what is happening at the time of the hangs you're seeing.

- You might want to explore alternate, custom kernels for your device (you didn't say what the device is, so I can't point you to any existing ones). That would give you more control and options for tuning and tweaking. Using or contacting a kernel dev could probably better pin-point where bottlenecks and options for improving performance lie.

Cheers and best of luck!
 
Back
Top Bottom