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
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.Paintin a loop.Did you find any workaround?
None.
Relevant log output
No response