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

Enhancement Trigger Event Handler #11232

Merged
merged 7 commits into from
Jan 11, 2022
Merged

Enhancement Trigger Event Handler #11232

merged 7 commits into from
Jan 11, 2022

Conversation

realLiangshiwei
Copy link
Member

@realLiangshiwei realLiangshiwei commented Jan 7, 2022

Resolve #11030

public class EmailSendEventData
{
}

public class EmailSendEventHandler : IDistributedEventHandler<EmailSendEventData>, ITransientDependency
{
    public Task HandleEventAsync(EmailSendEventData eventData)
    {
        return Task.CompletedTask;
    }
}

for (var i = 0; i < 10000; i++)
{
    await bus.PublishAsync(new EmailSendEventData());
}

Before 65ms
After 54ms

@realLiangshiwei realLiangshiwei marked this pull request as ready for review January 8, 2022 10:38
@realLiangshiwei realLiangshiwei changed the base branch from dev to rel-5.1 January 10, 2022 13:44
@maliming maliming merged commit 615a35f into rel-5.1 Jan 11, 2022
@maliming maliming deleted the liangshiwei/eventbus branch January 11, 2022 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Replace EventBus Reflection with compiled Expression
3 participants