1

To automate tests, we are considering the Android instrumentation tests. However, we are concerning the performance may differ significantly if the unit tests are put in the debug mode. After doing some search, there seems no definitive answers. Thus, we need some clarifications about the following points.

  1. Does Eclipse/ADT compile the project using the same compiler optimization options whether it is in debug or release mode?

  2. the apk generated by Eclipse/ADT is always in debug mode (whatever "run as" or "debug as"). The suggested way to build the release version is through the export wizard. The only difference is the attribute "android:debuggable='true'" in the resulting AndroidManifest.xml. Without proguard enabled, the resulting size seems the same. Assuming no compiler optimization, does this attribute cause or change the JIT optimization at run-time significantly?

  3. We use the debug key to sign the apk and it seems to work. Is the resulting apk truly a release version (We think so because "android:debuggable="true" is removed)?

Thanks.

Farley
  • 1,160
  • 1
  • 10
  • 17

1 Answers1

1

1) Yes and no, even though the optimization is the same, the application will run slower as it will have lots of subproceses monitoring it.

2) AFAIK it isn't significative but it will affect the performance of your app.

3) It will work but it's not recommended, you should try reading the SDK here http://developer.android.com/tools/publishing/app-signing.html

  • For 1), you mean the options are the same so the run time execution should be the same but the debug version would run slower because it's monitored by some other subprocesses? For 2), the reason it will affect the performance is because the monitoring subprocesses as mentioned in 1)? As long as the Debug trace is not enabled, the different should not be significant, right?For 3), well, we're in the performance evaluation stage and not reaching the public release yet. So a quick way to make a release version to test would suffice. – Farley Mar 20 '13 at 09:05
  • 1) yes, as it's being monitored constantly the application will run slower. 2) yes, but even though removing the attribute android:debuggable, your app will still be being monitored as long as you don't install it using the export in eclipse. As for 3) it will take you 2 minutes to create your own key, that way you can be sure that there is nothing related to debugging – Cristian Eduardo Lehuede Lyon Mar 20 '13 at 18:41
  • Your answers are very helpful! Nonetheless, I want to dig into the monitoring processes more. I thought it's the DDMS. Is there anything else or can you give me some references? Thanks. – Farley Mar 21 '13 at 03:18
  • Sorry,I don't know where else you could look for monitoring! – Cristian Eduardo Lehuede Lyon Mar 21 '13 at 21:01
  • If you think I did good, please click my answer as correct. Else, tell me what else I could search for you. – Cristian Eduardo Lehuede Lyon Mar 21 '13 at 23:16