I collected a startup trace of dotnet new maui app on Android and this is what the top 10 methods were
>_ dotnet trace report TestDummy_20260410_150148.nettrace topN -n 10
Top 10 Functions (Exclusive) Inclusive Exclusive
1. WaitSubsystem+ThreadWaitInfo.Wait(int32,bool,bool,value class LockHold 71.9% 71.9%
2. sockets!Interop+Sys.WaitForSocketEvents(int,value class SocketEvent*,i 17.69% 17.69%
3. RuntimeNativeMethods._monodroid_gref_log(class System.String) 4.4% 4.4%
4. GC.RunFinalizers() 6.32% 1.78%
5. CustomAttribute.IsCustomAttributeDefined(class System.Reflection.Runti 0.69% 0.52%
6. RuntimeNativeMethods._monodroid_lref_log_delete(int32,int,unsigned int 0.53% 0.52%
7. RuntimeNativeMethods._monodroid_lref_log_new(int32,int,unsigned int8,c 0.5% 0.49%
8. StackTrace.GetStackFramesInternal(class System.Diagnostics.StackFrameH 0.31% 0.31%
9. ManagedValueManager.PeekPeer(value class Java.Interop.JniObjectReferen 0.21% 0.2%
10. ModuleHandle.ResolveType(value class System.Runtime.CompilerServices.Q 0.17% 0.17%
RuntimeNativeMethods._monodroid_gref_log + RuntimeNativeMethods._monodroid_lref_log_delete + RuntimeNativeMethods._monodroid_lref_log_new stand out. I would not expect these to have such impact on MAUI app startup, especially the 4.4% of gref log.
I collected a startup trace of
dotnet new mauiapp on Android and this is what the top 10 methods wereRuntimeNativeMethods._monodroid_gref_log+RuntimeNativeMethods._monodroid_lref_log_delete+RuntimeNativeMethods._monodroid_lref_log_newstand out. I would not expect these to have such impact on MAUI app startup, especially the 4.4% of gref log.