Skip to content

Conversation

@AlexUstinov
Copy link

In this PR we remove GetGenericMethodDefinition call frequently called during query translation

public override int GetHashCode()
{
unchecked {
return (module.GetHashCode() * 397) ^ metadataToken;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest HashCode.Combine(module, metadataToken)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd perform perf testing first to identify best option.

@AlexUstinov AlexUstinov merged commit e59bb67 into master-servicetitan Jul 7, 2020
@AlexUstinov AlexUstinov deleted the canonic-member branch July 7, 2020 23:22
case ConflictHandlingMethod.ReportError:
compilers.MergeWith(newItems, true);
break;
foreach (var (targetMember, compiler) in newRegistrations) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes behavior, previous version performed atomic merge, new one merges items one by one.

AlexUstinov added a commit that referenced this pull request Aug 10, 2020
Eliminate GetGenericMethodDefinition method call in MemberCompilerProvider class
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.

4 participants