-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add .NET 6 support for --aot-lazy-assembly-load
#6935
Labels
Area: App+Library Build
Issues when building Library projects or Application projects.
Area: App Runtime
Issues in `libmonodroid.so`.
Milestone
Comments
grendello
added a commit
to grendello/xamarin-android
that referenced
this issue
Apr 19, 2022
Fixes: dotnet#6935 Context: dotnet/runtime#67024 Add support for enabling lazy loading of AOTd assemblies and their associated shared libraries, when targetting .NET6+. The feature is enabled by default when AOT is enabled for `Release` builds and can be disabled by setting the new `$(AndroidAotEnableLazyLoad)` MSBuild property to `false`.
grendello
added a commit
to grendello/xamarin-android
that referenced
this issue
Apr 22, 2022
Fixes: dotnet#6935 Context: dotnet/runtime#67024 Add support for enabling lazy loading of AOTd assemblies and their associated shared libraries, when targetting .NET6+. The feature is enabled by default when AOT is enabled for `Release` builds and can be disabled by setting the new `$(AndroidAotEnableLazyLoad)` MSBuild property to `false`.
grendello
added a commit
to grendello/xamarin-android
that referenced
this issue
Apr 22, 2022
Fixes: dotnet#6935 Context: dotnet/runtime#67024 Add support for enabling lazy loading of AOTd assemblies and their associated shared libraries, when targetting .NET6+. The feature is enabled by default when AOT is enabled for `Release` builds and can be disabled by setting the new `$(AndroidAotEnableLazyLoad)` MSBuild property to `false`.
grendello
added a commit
to grendello/xamarin-android
that referenced
this issue
Apr 25, 2022
Fixes: dotnet#6935 Context: dotnet/runtime#67024 Add support for enabling lazy loading of AOTd assemblies and their associated shared libraries, when targetting .NET6+. The feature is enabled by default when AOT is enabled for `Release` builds and can be disabled by setting the new `$(AndroidAotEnableLazyLoad)` MSBuild property to `false`.
jonpryor
pushed a commit
that referenced
this issue
Apr 25, 2022
Fixes: #6935 Context: dotnet/runtime#67024 Add support for enabling lazy loading of AOTd assemblies and their associated shared libraries, when targeting .NET6+. The feature is enabled by default when AOT is enabled for `Release` builds and can be disabled by setting the new `$(AndroidAotEnableLazyLoad)` MSBuild property to `false`. Performance gains are obvious, but their scale depends on where we look. Results of running a Hello World MAUI app on Pixel 6 Pro, with: See PR for full timing details. With: * `$(RuntimeIdentifier)`=android-arm64 * `$(AndroidEnablePreloadAssemblies)`=False * `$(AndroidUseAssemblyStore)`=True, `$(AndroidEnableAssemblyCompression)`=True | Scenario | Before | After | Δ | | ------------------------------------- | --------: | --------: | --------: | | `ActivityTaskManager: Displayed` time | 367.800 | 368.200 | +0.11% ✗ | | `JNIEnv.Initialize()` time | 6.221 | 5.367 | -13.73% ✓ | | Total native init time | 39.047 | 20.395 | -47.77% ✓ | With: * `$(RuntimeIdentifier)`=android-arm * `$(AndroidEnablePreloadAssemblies)`=True * `$(AndroidUseAssemblyStore)`=True, `$(AndroidEnableAssemblyCompression)`=True | Scenario | Before | After | Δ | | ------------------------------------- | --------: | --------: | --------: | | `ActivityTaskManager: Displayed` time | 490.600 | 475.000 | -3.18% ✓ | | `JNIEnv.Initialize()` time | 8.602 | 7.787 | -9.48% ✓ | | Total native init time | 47.726 | 27.156 | -43.10% ✓ |
jonathanpeppers
pushed a commit
to jonathanpeppers/xamarin-android
that referenced
this issue
Apr 25, 2022
Backports: dotnet#6940 Fixes: dotnet#6935 Context: dotnet/runtime#67024 Add support for enabling lazy loading of AOTd assemblies and their associated shared libraries, when targeting .NET6+. The feature is enabled by default when AOT is enabled for `Release` builds and can be disabled by setting the new `$(AndroidAotEnableLazyLoad)` MSBuild property to `false`. Performance gains are obvious, but their scale depends on where we look. Results of running a Hello World MAUI app on Pixel 6 Pro, with: See PR for full timing details. With: * `$(RuntimeIdentifier)`=android-arm64 * `$(AndroidEnablePreloadAssemblies)`=False * `$(AndroidUseAssemblyStore)`=True, `$(AndroidEnableAssemblyCompression)`=True | Scenario | Before | After | Δ | | ------------------------------------- | --------: | --------: | --------: | | `ActivityTaskManager: Displayed` time | 367.800 | 368.200 | +0.11% ✗ | | `JNIEnv.Initialize()` time | 6.221 | 5.367 | -13.73% ✓ | | Total native init time | 39.047 | 20.395 | -47.77% ✓ | With: * `$(RuntimeIdentifier)`=android-arm * `$(AndroidEnablePreloadAssemblies)`=True * `$(AndroidUseAssemblyStore)`=True, `$(AndroidEnableAssemblyCompression)`=True | Scenario | Before | After | Δ | | ------------------------------------- | --------: | --------: | --------: | | `ActivityTaskManager: Displayed` time | 490.600 | 475.000 | -3.18% ✓ | | `JNIEnv.Initialize()` time | 8.602 | 7.787 | -9.48% ✓ | | Total native init time | 47.726 | 27.156 | -43.10% ✓ |
jonathanpeppers
added a commit
that referenced
this issue
Apr 26, 2022
Backports: #6940 Fixes: #6935 Context: dotnet/runtime#67024 Add support for enabling lazy loading of AOTd assemblies and their associated shared libraries, when targeting .NET6+. The feature is enabled by default when AOT is enabled for `Release` builds and can be disabled by setting the new `$(AndroidAotEnableLazyLoad)` MSBuild property to `false`. Performance gains are obvious, but their scale depends on where we look. Results of running a Hello World MAUI app on Pixel 6 Pro, with: See PR for full timing details. With: * `$(RuntimeIdentifier)`=android-arm64 * `$(AndroidEnablePreloadAssemblies)`=False * `$(AndroidUseAssemblyStore)`=True, `$(AndroidEnableAssemblyCompression)`=True | Scenario | Before | After | Δ | | ------------------------------------- | --------: | --------: | --------: | | `ActivityTaskManager: Displayed` time | 367.800 | 368.200 | +0.11% ✗ | | `JNIEnv.Initialize()` time | 6.221 | 5.367 | -13.73% ✓ | | Total native init time | 39.047 | 20.395 | -47.77% ✓ | With: * `$(RuntimeIdentifier)`=android-arm * `$(AndroidEnablePreloadAssemblies)`=True * `$(AndroidUseAssemblyStore)`=True, `$(AndroidEnableAssemblyCompression)`=True | Scenario | Before | After | Δ | | ------------------------------------- | --------: | --------: | --------: | | `ActivityTaskManager: Displayed` time | 490.600 | 475.000 | -3.18% ✓ | | `JNIEnv.Initialize()` time | 8.602 | 7.787 | -9.48% ✓ | | Total native init time | 47.726 | 27.156 | -43.10% ✓ | Co-authored-by: Marek Habersack <grendel@twistedcode.net>
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Labels
Area: App+Library Build
Issues when building Library projects or Application projects.
Area: App Runtime
Issues in `libmonodroid.so`.
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
.NET 6
Description
See:
We need to pass
--aot-lazy-assembly-load
by default for Release + AOT builds in .NET 6. We need an MSBuild property to "opt out" if needed.We found this saves ~10ms to startup in a
dotnet new maui
project on a Pixel 5.The text was updated successfully, but these errors were encountered: