Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get performance increases using Processing for Android?

I have converted a few of my Processing sketches into Android apps, but they seem to run really slowly in the emulator and on my device.

Are there any tips on how to increase the speed and performance of my sketch running as an Android app? Are there things or parts of the Processing API I should avoid?

like image 983
Adam Harte Avatar asked Oct 14 '10 06:10

Adam Harte


People also ask

What is Android performance tuning?

• Android Performance Tuner (APT) enables you to deliver the best possible experience to each of your users by helping you to measure and optimize frame rates, graphical fidelity, loading time and loading abandonment across many Android devices at scale.

What is sustained performance mode?

An Android application can request the platform to enter a sustained performance mode where the Android device can keep a consistent level of performance for prolonged periods of time.


2 Answers

http://developer.android.com/guide/practices/design/performance.html I hope that helps you.

like image 173
BlackDragonBE Avatar answered Nov 02 '22 05:11

BlackDragonBE


Facepalm to all answers...Their answers are for programmers that need every single % of the CPU optimized. But I have the same issue as you, not really having much going on in the sketch, but it's still slow. And I doubt BlackDragon even knows what Processing is

My answer: Try using a different renderer, P2D for example.

You can use it by putting it next to the sketch size definition:

size(Width,Heigth,P2D);

Or if you don't want to use that function, you can override the sketchRenderer by placing this method.

String sketchRenderer(){
   return P2D;
}
like image 2
BasBloem Avatar answered Nov 02 '22 06:11

BasBloem