Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use LinkContext caching when resolving ExportedTypes #3074

Closed
wants to merge 8 commits into from

Conversation

jtschuster
Copy link
Member

Builds off of #3073.

Bans MethodReference.Resolve and ExportedType.Resolve and recommend LinkContext.Resolve instead.

Adds a cache on LinkContext for resolving ExportedTypes and replaces calls to Cecil's Resolve.

Replaces some calls to MethodReference.Resolve.

Together with #3073, performance improves to better than before the virtual method regression in August.

Trimmer CPU sec on ASP.Net benchmarks build:
27325 before the regression related to #3067
87310 in main
23520 after this change

Instead of checking every virtual method to see if it should be kept due
to a base method every iteration of the MarkStep pipeline, check each
method only when it's relevant state has changed. These state changes
are:
- The override's declaring type is marked as instantiated
- The base method is marked
- The overrides's declaring type is marked as relevant to variant
  casting
@jtschuster
Copy link
Member Author

Isolated the changes into #3075

@jtschuster jtschuster closed this Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant