TypeManager.CreateProxy does not cache constructor reflection #7479
Labels
Area: App Runtime
Issues in `libmonodroid.so`.
Area: Performance
Issues with performance.
enhancement
Proposed change to current functionality.
Milestone
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
.NET 6 and 7
Description
The following piece of code is very expensive when manipulating native objects:
https://github.com/xamarin/xamarin-android/blob/91669a4e489104668fdd07382e40cf070aa559ac/src/Mono.Android/Java.Interop/TypeManager.cs#L327-L348
As there is no caching for getting constructors, in the worst case, twice:
Steps to Reproduce
Get
ShapeDrawable.Paint
in a loop.Did you find any workaround?
None.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: