Skip to content

[IOS] Launch performance #7687

Closed
Closed
@NielsKnaap

Description

@NielsKnaap

Description

For the past few months I've been comparing Xamarin.forms and .NET MUAI.
Among other things, I looked at the startup speed of the application on iOS and Android.

To make the differences clear, I developed the same application for Xamarin.forms and .NET MAUI.

For Android I used the script from jonathanpeppers. Here I did indeed see an improvement as you point out in the latest devblog and in the readme from jonathanpeppers.

Now there is little to be found about the performance of iOS. I used Xcode instruments here to measure the startup speed of the applications. My results indicated that the .NET MAUI application launches 9% slower. After that, I zoomed in on the different startup components, which showed the "WillFinishLaunchingWithOptions" component to take 235 times longer:

Activity Xamarin .NET MAUI
Launching – UIKit Initialization 0.0240342s 0.02698242s
Launching – UIKit Scene Creation 0.0003936s 0.00042555s
Launching - WillFinishLaunchingWithOptions 0.0000899s 0.02119327s
Launching - DidFinishLaunchingWithOptions 0.2511294s 0.24910752s
Launching – Initial Frame Rendering 0.0233976s 0.03332989s

I see the same result when I create a new "Xamarin.forms blank" project and compare it with a new .NET MAUI project.

Now I don't know enough about what happens in this startup part. But was wondering if this is known? And what could make such an impact on the WillFinishLaunchingWithOptions?

Steps to Reproduce

  1. Create a new Xamarin.forms blank project
  2. Create a new .NET MAUI project
  3. Add development certificate for provisioning
  4. Build and deploy to physical iOS device (I used a iphone 7 on iOS 15.4.1)
  5. Use Xcode instrument launch to record a trace file of application startup

Version with bug

6.0 Release Candidate 3

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15.4.1

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    legacy-area-perfStartup / Runtime performanceperf/generalThe issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)platform/ioss/needs-infoIssue needs more info from the authort/bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions