-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[linker] use Java.Interop's TypeDefinitionCache (#4316)
Context: dotnet/java-interop@b81cfbb Similar to aff3b52, we can use `TypeDefinitionCache` in a few places in the linker. My approach was to make each linker step require a `TypeDefinitionCache` for its constructor as needed. This made a single `TypeDefinitionCache` used throughout a linker `Pipeline`. The `<LinkAssembliesNoShrink/>` MSBuild task could also control the lifetime of the `TypeDefinitionCache`. The results of building the Xamarin.Forms integration project on Windows: Before: 706 ms LinkAssembliesNoShrink 1 calls After: 695 ms LinkAssembliesNoShrink 1 calls On macOS / mono: Before: 1248 ms LinkAssembliesNoShrink 1 calls After: 1228 ms LinkAssembliesNoShrink 1 calls This saves ~20ms for a small app, but is probably worth it to get rid of the `[Obsolete]` warnings caused by: https://github.com/xamarin/java.interop/blob/4f47ec82c14ae6ca23c1dcde3f7b5c8b93b6a4f7/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionRocks.cs#L70-L72
- Loading branch information
1 parent
7192454
commit e604c9c
Showing
6 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters