TypeManager.RegisterType() doesn't use type mappings #1831
Labels
Area: App Runtime
Issues in `libmonodroid.so`.
Area: Performance
Issues with performance.
vs-sync
For internal use only; creates a VSTS "mirror" issue.
Milestone
When recently profiling Xamarin.Android application startup, we observed that a callstack "rooted" in
TypeManager.RegisterType()
was using LINQ.However, the real problem is that
TypeManager.RegisterType()
doesn't use our type mapping files!https://github.com/xamarin/xamarin-android/blob/bb8183c8c16667b18ba9197e78294b17a0af532c/src/Mono.Android/Java.Interop/TypeManager.cs#L310-L326
It should at minimum be using
JNIEnv.GetJniName(Type)
. Then, we need to make sure thatmonodroid_typemap_managed_to_java()
is actually returning values, so that we don't hit the (slow, LINQ-using)JavaNativeTypeManager.ToJniName()
fallback path.The text was updated successfully, but these errors were encountered: