Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the interpreter by default for Debug (UseInterpreter=True) #6841

Closed
mattleibow opened this issue Mar 17, 2022 · 0 comments · Fixed by #6843
Closed

Use the interpreter by default for Debug (UseInterpreter=True) #6841

mattleibow opened this issue Mar 17, 2022 · 0 comments · Fixed by #6843
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects.

Comments

@mattleibow
Copy link
Member

mattleibow commented Mar 17, 2022

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

All

Description

Set $(UseInterpreter) to True by default for debug builds of apps.

iOS issue: xamarin/xamarin-macios#14445

@mattleibow mattleibow added the needs-triage Issues that need to be assigned. label Mar 17, 2022
@jpobst jpobst assigned jonathanpeppers and unassigned jpobst Mar 17, 2022
@jpobst jpobst added Area: App+Library Build Issues when building Library projects or Application projects. and removed needs-triage Issues that need to be assigned. labels Mar 17, 2022
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this issue Mar 18, 2022
Fixes: dotnet#6729
Fixes: dotnet#6841

The `dotnet new maui` template enables:

    <!-- Required for C# Hot Reload -->
    <UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>

This should really just belong in each platform SDK instead of the
template.

Additionally, I found the interpreter improves startup times. For
example Release builds on a Pixel 5 would get:

| Application        | JIT Time(ms) | Interpreter Time(ms) | Profiled AOT Time(ms) |
|------------------- | ------------:| --------------------:| ---------------------:|
| dotnet new android |        244.1 |                210.1 |                 165.5 |
| dotnet new maui    |        887.6 |                717.2 |                 469.9 |

Source: https://github.com/jonathanpeppers/maui-profiling

So there is an improvement to the development loop into doing this.
jonathanpeppers added a commit that referenced this issue Mar 18, 2022
#6843)

Fixes: #6729
Fixes: #6841

The `dotnet new maui` template enables:

    <!-- Required for C# Hot Reload -->
    <UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>

This should really just belong in each platform SDK instead of the
template.

Additionally, I found the interpreter improves startup times. For
example Release builds on a Pixel 5 would get:

| Application        | JIT Time(ms) | Interpreter Time(ms) | Profiled AOT Time(ms) |
|------------------- | ------------:| --------------------:| ---------------------:|
| dotnet new android |        244.1 |                210.1 |                 165.5 |
| dotnet new maui    |        887.6 |                717.2 |                 469.9 |

Source: https://github.com/jonathanpeppers/maui-profiling

So there is an improvement to the development loop into doing this.
@ghost ghost locked as resolved and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: App+Library Build Issues when building Library projects or Application projects.
Projects
None yet
3 participants