protocol buffers - Zero Copy bytes in grpc c++ -


i started use grpc, , noticed bytes in c++ compiled std::string, means every grpc object arrives @ service needs copied new buffer because of std::string ownership.

i don't want copy every object new buffer before using (too many allocations).

is there known solution, or using grpc wrong?

grpc uses protobufs. can move stuff out of protobuf message calling generated release_xxx() methods.

string* release_foo(): releases ownership of field , returns pointer of string object. after calling this, caller takes ownership of allocated string object , foo() return empty string/empty bytes.

https://developers.google.com/protocol-buffers/docs/reference/cpp-generated


Comments

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -