We are working on a project where we are sending UUIDs between a
backedn written in C++ and a Python front end. Our proto file
specifies that we want to store these UUIDs in byte fields. This maps
to a std::string in C++ which we can assign to manually. We are
running into a problem on the Python
Hi,
is there anybody out there who can tell me how the special methods
like addcleared(), etc. for repeated field ptr work?
I guess I can somehow improve/avoid the allocation overhead, right?
Say, I have the following messages,
message test {
repeated chunk = 1;
}
message chunk {
int
The Java implementation does not contain any mutable singletons, so as long
as you are accessing different objects, there is no need to worry about
thread-safety. So, yes, multiple threads may call parseFrom() at the same
time as long as they are parsing from different streams.
On Mon, Jun 15,
Everything you say sounds right. If you want to know precisely what these
methods do, or how much overhead they incur, I encourage you to look at the
code in repeated_field.h -- it's not very complicated.
However, instead of trying to control all this in detail, it's usually
easiest to simply
However, instead of trying to control all this in detail, it's usually
easiest to simply make sure that you reuse your protobuf objects. If you
parse a message, clear it, and then parse another message into the same
object, it will reuse the memory for sub-objects and such which was
On Tue, Jun 16, 2009 at 10:13 AM, RobertFach
robert.f...@inf.tu-dresden.dewrote:
So if I understood you right, say my example message test contains 10
chunks, if I clear that message and parse another message containing 9
chunks, no allocation would be performed and 1 cleared chunk object
I am experimenting with repeated fields my dot-proto is as follows:
message Foo {
required string name= 1;
optional int32 id = 2;
optional int32 num = 3;
repeated string sbr = 4;
repeated int32 wrk