Repository navigation
Enable NativeAOT publishing for the mobile app - #4
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
simonrozsival
marked this pull request as ready for review
October 9, 2026 14:07
Collaborator
Author
|
The slow startup on CoreCLR is likely caused by dotnet/maui#39315 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PublishAot=truein the app andIsAotCompatible=truein Core, leaving runtime selection to the SDK.Validation
Samsung A16 startup comparison
Measured ARM64 Release APKs on the same Samsung A16 running Android 16. Each configuration has 15 measured process-cold launches across three randomized blocks, with two warmups excluded per block. The metric is Android
am start -W -STotalTime to first frame, not reboot/storage-cache-cold startup or time to a fully populated agenda. App data was preserved and thermal status remained normal.The full-R2R, Mono, and NativeAOT rows above were measured together in a fresh randomized comparison. The defaults row comes from the initial experiment; the audited custom-MIBC row comes from a subsequent controlled profile comparison. The full-R2R control in that subsequent batch measured 1,797 ms, consistent with the earlier batch but not identical.
APK size is acceptable. The unresolved concern is CoreCLR startup performance relative to Mono. Full R2R remains approximately 36.5% slower than .NET 10 Mono in the same measurement batch. The audited custom MIBC improves startup but remains approximately 19.9% slower than Mono across the respective batches. We need to investigate this gap rather than treat these measurements as a settled runtime-selection result.
MIBC audit
0.1.0-preview.12.26479.1withmaui profile startup --format mibcon the A16; the custom profile was added alongside the bundled MAUI profiles and its inclusion was verified in the actual crossgen2 inputs.Comparison limitations
The Mono baseline uses an isolated .NET SDK
10.0.401, workload set10.0.401.1, MAUI10.0.110, and Mono runtime10.0.12. Minimal compatibility changes were required for older XAML namespace handling, native Android handlers, status-bar APIs, tab badges, map APIs, back-button accessibility, and an optional JSON collection. The home content/data logic was retained and all 23 Core tests passed under .NET 10, but this is not a pure runtime-only comparison: MAUI/framework versions and some native presentation APIs differ. The isolated compatibility build does not change this PR's production .NET 11 pins or unconditionalPublishAot=truesetting.Raw launch samples, APK byte counts/hashes, build commands, traces, MIBCs, and the Mono compatibility patch are retained in local session artifacts outside the repository; generated binaries and traces are not committed.
Outstanding