-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Feedback] Xamarin Forms Startup Time Slow #3722
Comments
Are there automated metrics of startup time? I have seen more useful info in the Xamarin forums giving both AOT and non-AOT startup times, but can't find the thread right now. |
I think it's not just Xamarin.Forms what causes the startup time slow, it's also cause by Xamarin.Android (already filed an issue here and here the project board) |
Too slow startup, any updates on this? |
Hi, Any chance this is even being worked on? An update would be great. |
This has been a journey of a thousand steps, and we have more to go, I'm sure. But to answer your question, yes, we've been working on it. Here are some examples: dotnet/android#2515 |
We are trying to get a UWP app out the door using the Xamarin.Forms code we are using for our Android and iOS app. Startup time on UWP is absolutely terrible. We're talking 6-15 seconds of staring at a splash screen for an empty app! I hope this can be fixed soon. |
@mnxamdev are you testing in release mode (i.e. with an AOT build)? On UWP we get debug mode from 6.5 to 3.5 seconds (getting less the more you open the app), release mode 2.2s on a complex app. The strange thing is that if we time the creation of the |
@charlesroddie We are testing UWP in Release mode for x86 and x64 only. When you say AOT are you referring to the “Compile with .NET Native tool chain“ option for UWP? If not can you explain where that option is? |
For UWP is .Net Native Toolchain compilation the problem here? So what I figured out is if I set our UWP app to Release mode for x86 or x64 and unchecked .Net Native Toolchain and our app starts around 2 seconds but with it on I get app start in 6-8 seconds. From what I understand even if we uncheck that, the store will build with .Net Native Toolchain, is that correct? If Xamarin isn't looking to improve the startup time on UWP, some guidance here would be good. |
@mnxamdev AOT giving slower startup times is very unusual. I understand that it's time consuming to do but I think you'll have to get a reproduction. Worth a separate issue too. |
We just spent some time trying to optimise the startup time of our app which uses Xamarin.Forms and the shell
We seem to have run out of ways to speed it up. The rest of the time is Xamarin things that we don't control. Our startup time is 3 seconds till the UI is shown. Which honestly is not acceptable. Are there any plans to address this? |
I ended up using lazy loading from the xamarin community toolkit combined with custom AOT profile. Startup time is now 1.5s on a poco f1 phone. |
That is awesome @azrinsani thanks for letting us know! I think we have taken steps to make this better, and we're putting in even more effort for .NET MAUI in this area. Thanks everyone for your time and effort on this and tips to make it better. Please keep adding those. Closing this one for now as there is not much work for us more to do here right now. |
Description
The measured startup time for all of the above was measured by closing all previously started apps
Then running the release build of the app manually on the phone and counting the time until the "Welcome to Xamarin Forms!"
is displayed.
Those times are totally unacceptable.
To put this in perspective, Apple had a bit of a scandal when they first introduced their AutoLayout mechanism... it added
150 milliseconds to the start time and developers were (quite reasonably in my view) upset. (Apple has since greatly improved things.)
You've added 2000 to 4000 milliseconds to start time.
But hey, what's an order of magnitude between friends! :-)
____________
Developer Community URL: https://developercommunity.visualstudio.com/content/problem/27969/xamarin-forms-startup-time-slow.html
______________
Source
395078
The text was updated successfully, but these errors were encountered: