vtprotobuf
vtprotobuf copied to clipboard
codec: implement codec v2
This is a follow up from https://github.com/grpc/grpc-go/issues/6619
Go's gRPC implementation added a new CodecV2
interface that enables integration with their memory pooling logic.
Adopting this should vastly improve performance and garbage collection overhead.
I took a stab at an implementation using the upstream version as reference.
In a review I'm looking for confirmation that this is the right approach for pooling and any feedback to make this more robust for a variety of vtprotobuf users. For example, I'm requiring SizeVT()
here, which not everyone might generate; perhaps I could do a type assertion for that usage.