nowinandroid icon indicating copy to clipboard operation
nowinandroid copied to clipboard

[Bug]: Dex Layout reordering requires non-minified benchmark build

Open keyboardsurfer opened this issue 1 year ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is there a StackOverflow question about this issue?

  • [X] I have searched StackOverflow

What happened?

We can enable Dex layout reordering to use startup profiles. To use them, the benchmark build needs to have isMinifyEnabled = false.

Relevant logcat output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

keyboardsurfer avatar Oct 20 '23 08:10 keyboardsurfer

Can you specify the issue more ...

vatsasiddhartha avatar Nov 06 '23 16:11 vatsasiddhartha

+1 Can you explain what "Dex layout reordering" is? I found nothing while search for these terms. Is it an automated AGP process? Or a hidden configuration?

SimonMarquis avatar Nov 06 '23 18:11 SimonMarquis

+1 Can you explain what "Dex layout reordering" is? I found nothing while search for these terms. Is it an automated AGP process? Or a hidden configuration?

I guess it is DEX layout optimizations

https://developer.android.com/topic/performance/baselineprofiles/dex-layout-optimizations#dex-layout-optimizations

lihenggui avatar Nov 06 '23 18:11 lihenggui

Thanks a lot for the link. This means we need to enable this feature android.experimental.r8.dex-startup-optimization

android {
  experimentalProperties["android.experimental.r8.dex-startup-optimization"] = true
}

SimonMarquis avatar Nov 06 '23 19:11 SimonMarquis

can i pick this up

priyanshnama avatar Nov 22 '23 06:11 priyanshnama

Thanks @priyanshnama. With already #1020 in flight to address this issue there is no need for another approach at this time.

keyboardsurfer avatar Nov 22 '23 10:11 keyboardsurfer

The switch to not use a specific build type but rely on the Baseline Profile Gradle plugin to provide the right build type makes this bug obsolete.

keyboardsurfer avatar Feb 15 '24 13:02 keyboardsurfer