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

Perf improvements #1001

Merged
merged 9 commits into from
Oct 1, 2021
Merged

Perf improvements #1001

merged 9 commits into from
Oct 1, 2021

Conversation

manodasanW
Copy link
Member

@manodasanW manodasanW commented Sep 30, 2021

This PR makes several changes to improve the perf of CsWinRT projections based on what is seen in profiling:

  • Avoid constructing an ObjectReference when doing a release
  • Make all the MarshalGeneric reflection lambdas lazy as we do not use all the helper types in every scenario but rather a couple in most cases. This reduces JIT cost too.
  • Make all the concurrent dictionaries used as part of IDIC support lazy initialized as we don't use the caches in all scenarios and we are seeing a large # of empty ones on the finalizer.
  • Fix issue where activation factories were initialized multiple times for factory and statics when we needed only one instance
  • Remove creating lazy interface dictionary when there are no members and setting size in constructor

Fixes #987
Fixes #988
Fixes #825
Fixes #1000

@manodasanW manodasanW merged commit 54c6bfc into master Oct 1, 2021
@manodasanW manodasanW deleted the manodasanw/perfimprovements branch October 1, 2021 01:36
@j0shuams j0shuams mentioned this pull request Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants