Does using the protobuf Any time improve performance? Currently, I have a couple of services that just pass data through without doing any transformations. Would using the Any type save on cpu cycles spent serializing/deserializing data?
Packing a message inside an Any
will prevent the intermediate services that just pass it through from packing and unpacking it. Roughly speaking, if the time it takes to serialize+deserialize this message is larger than what it takes to serialize+deserialize an Any containing that message, then you may be able to save some CPU time, though I would suggest to measure first.