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

[android] add AOT profile for dotnet new maui -sc #28172

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

jonathanpeppers
Copy link
Member

There is a new "sample content" switch for the dotnet new maui template that brings in various NuGets and things automatically.

None of these things are in the built-in AOT profile, so let's record one specifically for this template. I also updated the other AOT profiles, as I can see some of the latest changes in dotnet/main/main calls different methods on startup.

Testing an average of 10 runs on a Pixel 7 Pro:

$ dotnet new maui
Before:
Average(ms): 446
Std Err(ms): 2.28035085019828
Std Dev(ms): 7.21110255092798
After:
Average(ms): 441
Std Err(ms): 5.09901951359278
Std Dev(ms): 16.1245154965971

$ dotnet new maui -sc
Before:
Average(ms): 1073.6
Std Err(ms): 8.35623519694525
Std Dev(ms): 26.4247358864127
After:
Average(ms): 832.1
Std Err(ms): 5.65773806392625
Std Dev(ms): 17.8913386866383

Since dotnet new maui -sc is still a bit slower, I will investigate how to improve this in other PRs.

There is a new "sample content" switch for the `dotnet new maui`
template that brings in various NuGets and things automatically.

None of these things are in the built-in AOT profile, so let's record
one specifically for this template. I also updated the other AOT
profiles, as I can see some of the latest changes in dotnet/main/main
calls different methods on startup.

Testing an average of 10 runs on a Pixel 7 Pro:

    $ dotnet new maui
    Before:
    Average(ms): 446
    Std Err(ms): 2.28035085019828
    Std Dev(ms): 7.21110255092798
    After:
    Average(ms): 441
    Std Err(ms): 5.09901951359278
    Std Dev(ms): 16.1245154965971

    $ dotnet new maui -sc
    Before:
    Average(ms): 1073.6
    Std Err(ms): 8.35623519694525
    Std Dev(ms): 26.4247358864127
    After:
    Average(ms): 832.1
    Std Err(ms): 5.65773806392625
    Std Dev(ms): 17.8913386866383

Since `dotnet new maui -sc` is still a bit slower, I will investigate
how to improve this in other PRs.
@jonathanpeppers jonathanpeppers added platform/android 🤖 delighter t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf) labels Mar 4, 2025
@Copilot Copilot bot review requested due to automatic review settings March 4, 2025 23:06
@jonathanpeppers jonathanpeppers requested a review from a team as a code owner March 4, 2025 23:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR introduces a new AOT profile for the "sample content" switch in the dotnet new maui template and updates existing profiles to reflect recent startup method changes in dotnet/main.

  • Adds build instructions and AOT profile for the maui-sc (sample content) template
  • Updates build commands and related documentation in the README to use the new ./.dotnet/dotnet path

Reviewed Changes

File Description
src/ProfiledAot/README.md Updated build instructions and added details for the maui-sc profile

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

@jonathanpeppers jonathanpeppers enabled auto-merge (squash) March 5, 2025 18:38
@jonathanpeppers jonathanpeppers merged commit 6fc44fb into main Mar 5, 2025
125 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/maui-sc-aotprofile branch March 5, 2025 23:07
bhavanesh2001 pushed a commit to bhavanesh2001/maui that referenced this pull request Mar 7, 2025
There is a new "sample content" switch for the `dotnet new maui`
template that brings in various NuGets and things automatically.

None of these things are in the built-in AOT profile, so let's record
one specifically for this template. I also updated the other AOT
profiles, as I can see some of the latest changes in dotnet/main/main
calls different methods on startup.

Testing an average of 10 runs on a Pixel 7 Pro:

    $ dotnet new maui
    Before:
    Average(ms): 446
    Std Err(ms): 2.28035085019828
    Std Dev(ms): 7.21110255092798
    After:
    Average(ms): 441
    Std Err(ms): 5.09901951359278
    Std Dev(ms): 16.1245154965971

    $ dotnet new maui -sc
    Before:
    Average(ms): 1073.6
    Std Err(ms): 8.35623519694525
    Std Dev(ms): 26.4247358864127
    After:
    Average(ms): 832.1
    Std Err(ms): 5.65773806392625
    Std Dev(ms): 17.8913386866383

Since `dotnet new maui -sc` is still a bit slower, I will investigate
how to improve this in other PRs.
rmarinho pushed a commit that referenced this pull request Mar 11, 2025
There is a new "sample content" switch for the `dotnet new maui`
template that brings in various NuGets and things automatically.

None of these things are in the built-in AOT profile, so let's record
one specifically for this template. I also updated the other AOT
profiles, as I can see some of the latest changes in dotnet/main/main
calls different methods on startup.

Testing an average of 10 runs on a Pixel 7 Pro:

    $ dotnet new maui
    Before:
    Average(ms): 446
    Std Err(ms): 2.28035085019828
    Std Dev(ms): 7.21110255092798
    After:
    Average(ms): 441
    Std Err(ms): 5.09901951359278
    Std Dev(ms): 16.1245154965971

    $ dotnet new maui -sc
    Before:
    Average(ms): 1073.6
    Std Err(ms): 8.35623519694525
    Std Dev(ms): 26.4247358864127
    After:
    Average(ms): 832.1
    Std Err(ms): 5.65773806392625
    Std Dev(ms): 17.8913386866383

Since `dotnet new maui -sc` is still a bit slower, I will investigate
how to improve this in other PRs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delighter platform/android 🤖 t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants