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

[Mono.Android] add another "built-in" JNINativeWrapper #6855

Merged
merged 1 commit into from Mar 25, 2022

Conversation

jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Mar 25, 2022

Context: dotnet/maui@680f1fb

dotnet new maui is logging:

03-24 16:21:42.193 16360 16360 D monodroid-assembly: Falling back to System.Reflection.Emit for delegate type '_JniMarshal_PPLLL_V': Void
n_OnComplete_Ljava_lang_Boolean_Landroid_graphics_drawable_Drawable_Ljava_lang_Runnable_(IntPtr, IntPtr, IntPtr, IntPtr, IntPtr)

So we can add a case for _JniMarshal_PPLLL_V:

Before:
48.18ms Mono.Android!Android.Runtime.JNINativeWrapper.CreateDelegate(System.Delegate)
After:
 3.13ms Mono.Android!Android.Runtime.JNINativeWrapper.CreateDelegate(System.Delegate)

This was dotnet trace output running on a Pixel 5.

Context: dotnet/maui@680f1fb

`dotnet new maui` is logging:

    03-24 16:21:42.193 16360 16360 D monodroid-assembly: Falling back to System.Reflection.Emit for delegate type '_JniMarshal_PPLLL_V': Void
    n_OnComplete_Ljava_lang_Boolean_Landroid_graphics_drawable_Drawable_Ljava_lang_Runnable_(IntPtr, IntPtr, IntPtr, IntPtr, IntPtr)

So we can add a case for `_JniMarshal_PPLLL_V`:

    Before:
    48.18ms Mono.Android!Android.Runtime.JNINativeWrapper.CreateDelegate(System.Delegate)
    After:
     3.13ms Mono.Android!Android.Runtime.JNINativeWrapper.CreateDelegate(System.Delegate)
@jonpryor jonpryor merged commit f5ae4ca into xamarin:main Mar 25, 2022
@jonathanpeppers jonathanpeppers deleted the MoreJNINativeWrapper branch March 25, 2022 13:58
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants