Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] use
ToJniName(type, cache)
(#7211)
I noticed there might be a performance regression in .NET 7 when building a .NET MAUI project, in the `<GenerateJavaStubs/>` MSBuild task: .NET 6: GenerateJavaStubs = 799 ms xa main: GenerateJavaStubs = 912 ms When reviewing what PerfView shows, I saw: 54.31ms (5.7%) module java.interop.tools.javacallablewrappers <<java.interop.tools.javacallablewrappers!Java.Interop.Tools.TypeNameMappings.JavaNativeTypeManager.ToJniName(class Mono.Cecil.TypeDefinition)>> This was the `JavaNativeTypeManager.ToJniName()` overload that did not take a `TypeDefinitionCache`. I found one instance of this in `<GenerateJavaStubs/>`. This doesn't seem like the .NET 7 regression, because it has always been this way. However, it seems to help quite a bit: GenerateJavaStubs = 825 ms GenerateJavaStubs = 867 ms This probably saves around ~50ms in this task.
- Loading branch information