Open joe-elliott opened 1 year ago
ok, i'm seeing the description here of expected behavior and understand now what is being done. https://github.com/planetscale/vtprotobuf/issues/8
We are looking at using this project with https://github.com/open-telemetry/opentelemetry-proto. I do believe for complex hierarchies of objects with highly variable slice lengths it's possible that individually pooling objects would out perform the current approach, but I do understand now what it's doing. If time permits I may attempt some benchmarks on the linked proto.
^ Adding this label to remind us that we need further information to tackle this issue. Namely, a benchmark showing that individually pooling objects can be more performant in certain scenarios.
Thank you for raising this!
As far as I can tell single fields are pooled correctly but repeated fields are not. Using the following proto:
I can see the the
ResetVT
andUnmarshalVT
methods correctly handle the "one" field but not the "children" field.Is there a way to do this that I'm not seeing?