Skip to content

[net6] xamarin_get_frame_length performance regression #14812

@jeromelaban

Description

@jeromelaban

Description

When invoking a UIView property (and likely anything else), there's a new native method being invoked xamarin_get_frame_length which incurs a very high cost when invoking methods.

This causes a very large performance regression (25:1 in some of our test cases) when comparing with legacy Xamarin.

The instruments traces below are from a physical device running arm64.

Steps to Reproduce

Create an application which invokes UIView.get_SuperView, invoke it in a loop.

Expected Behavior

Here's the Legacy Xamarin result:
image

Actual Behavior

Here's the .NET 6.0 RC1 result:
image

Environment

.NET 6 RC1 (https://aka.ms/dotnet/maui/rc.1.json)

Build Logs

Available on demand.

Example Project (If Possible)

None, see repro steps above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnetAn issue or pull request related to .NET (6)enhancementThe issue or pull request is an enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions