-
In startupbenchmark file, we have four ways to test the startup performance
Then I run and found out that 3 is the best way for performance. Why it happen? It did not use baseline profile at all. Is there anything wrong? Relevant logcat outputStartupBenchmark_startupWithoutPreCompilation timeToInitialDisplayMs min 1,279.5, median 1,312.9, max 1,459.9 Traces: Iteration 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Here is some reference https://developer.android.com/reference/androidx/benchmark/macro/CompilationMode Partial - the default configuration of Partial will partially pre-compile your application, if a Baseline Profile is included in your app. This represents the most realistic fresh-install experience on an end-user's device. You can additionally or instead use Partial.warmupIterations to use Profile Guided Optimization, using the benchmark content to guide pre-compilation. This can mimic an application's performance after background dexopt has partially compiled the app during device idle time, after the app has been used (generally after a day or more of usage after update/install). startupWithPartialCompilationAndDisabledBaselineProfile don't equal to not use pre-compile. It is more like a combination between AOT and JIT. If startupWithPartialCompilationAndDisabledBaselineProfile have better performance than StartupBenchmark_startupPrecompiledWithBaselineProfile. I believe baselineprofile is not that good enough. Here bring another question, how to get a good baseline profile file? Looks it is better not to do anything. No need to use baseline profile. startupWithPartialCompilationAndDisabledBaselineProfile has the best performance to startupbenchmark. |
Beta Was this translation helpful? Give feedback.
Here is some reference
https://developer.android.com/reference/androidx/benchmark/macro/CompilationMode
Partial - the default configuration of Partial will partially pre-compile your application, if a Baseline Profile is included in your app. This represents the most realistic fresh-install experience on an end-user's device. You can additionally or instead use Partial.warmupIterations to use Profile Guided Optimization, using the benchmark content to guide pre-compilation. This can mimic an application's performance after background dexopt has partially compiled the app during device idle time, after the app has been used (generally after a day or more of usage after update/install).
sta…