KEMBAR78
[android] update AOT profile by jonathanpeppers · Pull Request #6548 · dotnet/maui · GitHub
Skip to content

Conversation

@jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Apr 27, 2022

For dotnet/maui/main, I noticed the startup path changed a bit. Some
methods are not in the profile, such as:

AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateBackground (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).
AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateBackground (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).
AOT: NOT FOUND: Microsoft.Maui.Handlers.ButtonHandler:MapStrokeThickness (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButton).
AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateStrokeThickness (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).
AOT: NOT FOUND: Microsoft.Maui.Handlers.ButtonHandler:MapStrokeColor (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButton).
AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateStrokeColor (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).
AOT: NOT FOUND: Microsoft.Maui.Handlers.ButtonHandler:MapCornerRadius (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButton).
AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateCornerRadius (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).

There were also a couple changes in the template:

I had to adjust some of the code in src/ProfiledAot to account for
changes in the template.

I also included the use of Label to set FontAttributes and Text,
so these properties are also in the profile.

dotnet new maui on a Pixel 5:

Before:
Average(ms): 567.8
Std Err(ms): 2.63227826965328
Std Dev(ms): 8.32399476747126

After:
Average(ms): 558.8
Std Err(ms): 2.57250418420997
Std Dev(ms): 8.13497251241686

@mattleibow
Copy link
Member

Should those values be set in the initial java setter code? I wonder if we are doing something else wrong...

Comment on lines -4995 to +5001
void Microsoft.Maui.Handlers.ButtonHandler:MapStrokeColor (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButtonStroke)
void Microsoft.Maui.Handlers.ButtonHandler:MapStrokeThickness (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButtonStroke)
void Microsoft.Maui.Handlers.ButtonHandler:MapStrokeColor (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButton)
void Microsoft.Maui.Handlers.ButtonHandler:MapStrokeThickness (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButton)
Copy link
Member Author

Choose a reason for hiding this comment

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

@mattleibow I think it's because the signature changed on these -- and so now the AOT profile just needs updated.

@jonathanpeppers jonathanpeppers marked this pull request as draft April 27, 2022 16:27
@jonathanpeppers
Copy link
Member Author

There are some changes in the template, let me run this again

For dotnet/maui/main, I noticed the startup path changed a bit. Some
methods are not in the profile, such as:

    AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateBackground (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).
    AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateBackground (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).
    AOT: NOT FOUND: Microsoft.Maui.Handlers.ButtonHandler:MapStrokeThickness (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButton).
    AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateStrokeThickness (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).
    AOT: NOT FOUND: Microsoft.Maui.Handlers.ButtonHandler:MapStrokeColor (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButton).
    AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateStrokeColor (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).
    AOT: NOT FOUND: Microsoft.Maui.Handlers.ButtonHandler:MapCornerRadius (Microsoft.Maui.Handlers.IButtonHandler,Microsoft.Maui.IButton).
    AOT: NOT FOUND: Microsoft.Maui.Platform.ButtonExtensions:UpdateCornerRadius (Google.Android.Material.Button.MaterialButton,Microsoft.Maui.IButton).

There were also a couple changes in the template:

* 27c8d7e
* 6484698

I had to adjust some of the code in `src/ProfiledAot` to account for
changes in the template.

I also included the use of `Label` to set `FontAttributes` and `Text`,
so these properties are also in the profile.

`dotnet new maui` on a Pixel 5:

    Before:
    Average(ms): 567.8
    Std Err(ms): 2.63227826965328
    Std Dev(ms): 8.32399476747126

    After:
    Average(ms): 558.8
    Std Err(ms): 2.57250418420997
    Std Dev(ms): 8.13497251241686
@jonathanpeppers jonathanpeppers marked this pull request as ready for review April 27, 2022 16:45
@jonathanpeppers jonathanpeppers added the legacy-area-perf Startup / Runtime performance label Apr 27, 2022
@jonathanpeppers jonathanpeppers added this to the 6.0.300-rc.3 milestone Apr 27, 2022
@Redth Redth merged commit 3792cb1 into dotnet:main Apr 28, 2022
@jonathanpeppers jonathanpeppers deleted the ProfiledAOTRC3 branch April 28, 2022 13:37
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@Eilon Eilon added the perf/general The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf) label May 10, 2024
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! legacy-area-perf Startup / Runtime performance perf/general 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.

5 participants