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

Avoid allocating a closure for the client rpc executor #1986

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jul 22, 2024

Motivation:

The client RPC executor unconditionally allocates a closure when intercepting a request. This can be avoided if there are no interceptors.

Modifications:

  • Special case the no-interceptors path

Result:

Fewer allocations

Motivation:

The client RPC executor unconditionally allocates a closure when
intercepting a request. This can be avoided if there are no
interceptors.

Modifications:

- Special case the no-interceptors path

Result:

Fewer allocations
@glbrntt glbrntt requested a review from gjcairo July 22, 2024 16:53
@glbrntt glbrntt added the v2 A change for v2 label Jul 22, 2024
Copy link
Collaborator

@gjcairo gjcairo left a comment

Choose a reason for hiding this comment

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

Nice one!

@glbrntt glbrntt merged commit 04e6e0e into grpc:main Jul 23, 2024
15 of 17 checks passed
@glbrntt glbrntt deleted the avoid-alloc-interceptor branch July 23, 2024 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 A change for v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants