Python app on Android: running through PyDroid is twice faster than compiled app via Buildozer! Why?

Viewed 517

I am developing a mobile game for Android in Python using PyGame. So for debugging purposes, I have often used PyDroid, which is basically a mobile IDE for editing Python code on an Android mobile device. It also allows me to run the whole app in Python, since it also includes a working interpreter.

The app runs around 60 FPS with no problems (it's a simple 2D platformer, nothing very sophisticated).

When I build the application via Buildozer (using the procedure discussed in this answer), I am able to obtain an APK using the buildozer android debug command. When I install the APK, it works perfectly except for the frame rate: it's always around 30, never able to reach the same performance I see with PyDroid!

I would like to understand why this is happening. What is the difference between compiling the APK via Buildozer, and running the application on PyDroid? Is there a way to emulate exactly what happens on PyDroid also using Buildozer? Is there something I am doing wrongly? How can I improve the performance of the generated APK?

1 Answers

PyDroid simply has better infrastructure which allows for better performance.

I believe this is why - everything is native to Android and in Python. When I was reading about this I stumbled across this and I think this sums it up nicely:

"Pydroid 3 comes with an interface that allows you to install packages without writing your commands in the terminal." - this likely has an impact on performance too.

Related