-
Notifications
You must be signed in to change notification settings - Fork 107
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
Ujjwalchadha/perf/eventsourcecodegen #852
Conversation
@@ -188,6 +192,7 @@ Where <spec> is one or more of: | |||
continue; | |||
} | |||
auto guard{ w.push_generic_params(type.GenericParam()) }; | |||
auto guard1{ helperWriter.push_generic_params(type.GenericParam()) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think helperWriter is needed - you're only ever calling write_temp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we do need this because it is tied to the generic params that we set here. The write_temp functions uses the generic_params that we push to the helperWriter to write the type name and so on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but w is pushing those very same generic params. can you try?
This PR improves the performance of subscribing to new events by removing the need for reflection. We precompute the handlers that the native code needs to invoke using the cswinrt code generator rather than compiling them at runtime using reflection. A new benchmark has been added to compute and compare the performance of an event being subscribed and invoked.