I've been experimenting with Android's Baseline Profile & MacroBenchmark libraries for improving the app performance.
The question I have is that it is suggested that the MacroBenchmark's build-types be as close to the release
build but with -dontobfuscate
in the proguard rules.
If the production app is going to be obfuscated
via minification
then how can Baseline Profiler help in app performance as the classes could be completely different in baseline-prof.txt
& in the app's classes.dex
file.
Is there some sort of mapping happening internally between Profiler & Proguard/R8?
I asked the same question on the Google Issue Tracker & was told that the Baseline Profile also participates in the obfuscation process & the classes/methods recorded by the benchmark are refactored with the new obfuscated ones during the obfuscation.
Source: Check comment#2.