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

Improvements to subscribing to events #1027

Merged
merged 6 commits into from
Oct 26, 2021

Conversation

manodasanW
Copy link
Member

  • Remove calls to Mono.ThreadContext on .NET 5 as it is for .NET standard 2 support
  • Move the manual projection for IWeakReference to use the new updated format that provides an alternative to IDIC
  • Remove the vftbl for IWeakReference as it is not a generic type
  • Take advantage of both of the above in event sources to get a weak reference
  • Move both the Cache and state class outside of event source so that there isn't a version of it per delegate type and so that we are not creating a new set of dictionaries (both the static one and the instance one) per delegate type.
  • Reduce the cost of getting a weak reference by reducing allocations.

Copy link
Member

@Scottj1s Scottj1s left a comment

Choose a reason for hiding this comment

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

looks good!

@manodasanW manodasanW merged commit b8d4b5e into master Oct 26, 2021
@manodasanW manodasanW deleted the manodasanw/eventperfimprovements2 branch October 26, 2021 18:23
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.

3 participants