You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, since the new managed variant shows significant performance improvements for simple method signatures on macOS and MacCatalyst, we should investigate enabling it as the new default registrar and measure the size and performance impact of such change for all supported runtimes as well.
The text was updated successfully, but these errors were encountered:
### Description
This PR sets the default registrar to be `managed-static` for the following platforms and build configurations:
- `ios` and `tvos` device builds in `Debug` and `Release` configurations
- `macOS` and `MacCatalyst` builds in `Release` configuration
This is accomplished by moving the registrar selection logic from custom linker steps (dotnet-linker) into the SDK.
Legacy code still has appropriate `SelectRegistrar` methods.
### App size implications
Using managed-static registrar increases the `dotnet new maui` app on
iOS by `~2-3%`.
Tested with dotnet `9.0.100-preview.2.24119.3`
| dotnet new maui (LinkMode=SdkOnly) | static | managed-static | diff (%) |
|------------------------------------|--------|----------------|----------|
| Size on disk (MB) | 39,20 | 40,29 | 2,79% |
| Size zipped (MB) | 14,52 | 14,80 | 1,92% |
| dotnet new maui (LinkMode=Full) | static | managed-static | diff (%) |
|-----------------------------------|---------|----------------|----------|
| Size on disk (MB) | 29,93 | 30,88 | 3,18% |
| Size zipped (MB) | 11,20 | 11,47 | 2,37% |
We talked about the size increase, and we're tentatively trying to enable by default anyways (since the managed static registrar is typically faster), but documenting what we're doing.
---
Fixes#19769
A new variant of static registrar has been implemented: https://github.com/xamarin/xamarin-macios/blob/main/docs/managed-static-registrar.md to support NativeAOT runtime.
However, since the new managed variant shows significant performance improvements for simple method signatures on macOS and MacCatalyst, we should investigate enabling it as the new default registrar and measure the size and performance impact of such change for all supported runtimes as well.
The text was updated successfully, but these errors were encountered: