Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
keyboardsurfer opened this issue Oct 20, 2023 · 7 comments
Closed
3 tasks done
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@keyboardsurfer
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • 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

  • I agree to follow this project's Code of Conduct
@keyboardsurfer keyboardsurfer added bug Something isn't working good first issue Good for newcomers labels Oct 20, 2023
@keyboardsurfer keyboardsurfer self-assigned this Oct 20, 2023
@vatsasiddhartha
Copy link

Can you specify the issue more ...

@SimonMarquis
Copy link
Contributor

+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?

@lihenggui
Copy link
Contributor

+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

@SimonMarquis
Copy link
Contributor

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 added a commit to SimonMarquis/nowinandroid that referenced this issue Nov 6, 2023
- Disable minification
- Enable `android.experimental.r8.dex-startup-optimization`

Closes android#992
@priyanshnama
Copy link

can i pick this up

@keyboardsurfer
Copy link
Member Author

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

@keyboardsurfer
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants