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?
• 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.
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.
http://developer.android.com/guide/practices/design/performance.html I hope that helps you.
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;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With