Qt on Android: manifest debuggable="false" flag slows down application dramatically
-
Here's the fragment of AndroidManifest.xml:
@<?xml version='1.0' encoding='utf-8'?>
<manifest package="..." xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
<application android:name="org.qtproject.qt5.android.bindings.QtApplication"
android:label="@string/app_name"
android:debuggable="false"
>
@in which android:debuggable="false" makes application run dramatically slow which is noticeable when much redrawing is required.
Setting android:debuggable to "true" removes an issue but not allow releasing application on Play Market.
I tried to build Qt with minimal settings to avoid using most modules but it didn't help.
Now I'll try to make smallest example reproducing an issue but it will take much time.Why can this happen anyway?
-
I've found out that such behavior (very slow painting) is only exposed with rendering gradients.
So if I remove gradient painting code, the settings android:debuggable to “false” doesn't slow down painting.
I'm not sure if I'm going to continue my investigation further. But that's really a nasty bug. -
Would you mind showing your code so that we can try reproducing the issue you faced?
-
Here's the source code with bug exposed:
http://devel.nomrhis.net/files/exposed.tar.gz
Since I've stripped most things to expose only valuable code the application looks like white screen at the beginning so start touching it.
The code which causes slowing down is at "widgets/analogtimer.cpp".
The flag is at "android-sources/AndroidManifest.xml" (set debuggable="true" to make it work faster).
You may try to replace C++ drawing code with something heavier but without gradients and you'll see that it works even faster in case of debuggable="false".