vtprotobuf icon indicating copy to clipboard operation
vtprotobuf copied to clipboard

codec: implement codec v2

Open jzelinskie opened this issue 5 months ago • 8 comments

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.

jzelinskie avatar Aug 24 '24 16:08 jzelinskie