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(grpcrouter): Investigate alternatives to proto.Merge #18003

Closed
testinginprod opened this issue Oct 9, 2023 · 0 comments
Closed

perf(grpcrouter): Investigate alternatives to proto.Merge #18003

testinginprod opened this issue Oct 9, 2023 · 0 comments
Assignees
Labels
C: Proto Proto definition and proto release T: Performance Performance improvements

Comments

@testinginprod
Copy link
Contributor

In #17921

Since the Handler signature is: func(ctx context.Context, req, resp protoiface.Messagev1) error
And the gRPC method handler is func(ctx context.Context, decoderFunc func(msg any) error, handler func(ctx context.Context, req any) (resp any, err error)

We need to decode req from Handler into msg from decoderFunc, to do so we use merging, this also brings in support and safety with respect to synthetic messages like dynamicpb.

Then since resp  is passed in by Handler and the grpc method handler returns any we need to copy the response from the grpc method handler into resp from Handler, to do so we use proto.Merge again, which as for the former case allows for support of synthetic messages.

Investigate if there is a more performant way of doing so.

@testinginprod testinginprod changed the title perf(grpcrouter): perf(grpcrouter): Investigate alternatives to proto.Merge Oct 9, 2023
@github-actions github-actions bot added the needs-triage Issue that needs to be triaged label Oct 9, 2023
@tac0turtle tac0turtle added T: Performance Performance improvements C: Proto Proto definition and proto release and removed needs-triage Issue that needs to be triaged labels Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Proto Proto definition and proto release T: Performance Performance improvements
Projects
None yet
Development

No branches or pull requests

2 participants