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

Optimize RequestHandlerWrapperImpl object construction in Mediator's Send Methods #966

Closed
wants to merge 9 commits into from

Conversation

pauldin91
Copy link

Remove activator usage from Send methods, and use new and compiled expression for constructing RequestHandlerWrapperImpl objects

@pauldin91 pauldin91 closed this Nov 2, 2023
@pauldin91 pauldin91 reopened this Nov 2, 2023
@jbogard
Copy link
Owner

jbogard commented Nov 2, 2023

^^ "Whoops" 🤣

Copy link

github-actions bot commented Dec 1, 2023

This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Dec 1, 2023
@pijio
Copy link

pijio commented Dec 6, 2023

@jbogard Are you planning to merge this pull request?

@github-actions github-actions bot removed the Stale label Dec 6, 2023
Copy link

github-actions bot commented Jan 4, 2024

This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 4, 2024
@jbogard
Copy link
Owner

jbogard commented Jan 9, 2024

Is this any faster than Activator.CreateInstance? It's only used once and cached.

@pauldin91
Copy link
Author

Hello @jbogard . No, activator is a still faster than non-cached compiled expressions. To cache the compiled expression, the request type must be known at compile time which in the current situation cannot happen. The only thing that is faster than cached activator is the non-cached direct construction with new. I will revert the changes and commit only the construction with new.

…ject request and Send for object request"

This reverts commit 9279156.
This reverts commit 73adb45.
…tion and CreateStream<TResponse> also"

This reverts commit 183c6ce.
…piled expressions for constructing RequestHandlerWrapperImpl objects"

This reverts commit b7b9d28.
@github-actions github-actions bot removed the Stale label Jan 10, 2024
Copy link

github-actions bot commented Feb 8, 2024

This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 8, 2024
Copy link

This PR was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants