Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save two allocations by making
MapRPCWriter
and `SerializingRPCWrit…
…er` generic over wrapped writer (#1983) Motivation: We currently wrap a base writer into an `RPCWriter` inside the `MapRPCWriter` and `SerializingRPCWriter`. This results in an unnecessary allocation in both cases. In the case of unary requests, this means two extra allocations per requests on the client side. Modifications: Make the `MapRPCWriter` and `SerializingRPCWriter` generic over the base writer, to avoid the extra allocations caused by wrapping them in an `RPCWriter`. Result: Two fewer allocations per unary request on the client side.
- Loading branch information