I have a use-case where I get an object of a different nature, which I cannot change. I need to serialize this object to the wire as a ProtoBuf object. I have a mirror ProtoBuf object structure, all defined and working fine. However, I currently need to deep-clone my original object into the PB object and then call writeTo() on it, and this deep-cloning is too expensive for my perf goals. Any ideas how I could get around this cloning? I was thinking about customizing the ProtoC code generation to generate the objects as extending my hierarchy (but I don't like the idea of rewriting ProtoC), or to use an external writeTo() that takes my original object (rather than the gen'ed ProtoBuf one), but none of them seem feasible all the way thru...
BTW, I'm using all Java. Thanks in advance! -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/HJZ-n6mAfDkJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
