[xamlc] ~20% of time spent in `XmlTypeExtensions.GetTypeReference()`
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description
While running `dotnet trace` on `dotnet build`, I noticed:

([See docs on how to do this](https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/tracing.md#how-to-dotnet-trace-our-build))
Is it possible to cache some of the calls here? There is some `string.Split()` that could also be improved, but that is probably a smaller thing to improve.
Most of the actual work is Mono.Cecil reading/doing things:

### Public API Changes
n/a
### Intended Use-Case
Any time saved in XamlC is time saved in all incremental builds on all platforms.
### Logs
[mauibuild.zip](https://github.com/dotnet/maui/files/10060443/mauibuild.zip)
Looks at Thread 10 (18516) in the `.speedscope`.
Contributor guide
Assessment
This issue has not been assessed yet.