I was wondering which of the following ways to define a .proto would be 
faster / more space efficient -- or if there'd be no difference at all...

Option 1:
message Packet {

  repeated Process process = 6;
  message Process {
    optional uint32 pid = 1;
    optional string execname = 14;

or Option 2:
message Packet {

  optional uint32 pid1 = 6;
optional string execname1 = 20;
  optional uint32 pid2 = 21;
optional string execname2 = 35;

I'm essentially wondering what effect "loop unwinding" has in a protobuf (and 
yes, I know how many of the Process protos I have). Because the ID is used, I'm 
wondering if the extra byte (when you go from 15 to 255) is that much of an 
issue. Also I'm not sure how actually reading into the "repeated" works, so I'm 
wondering about speed (in creation/setting/encoding/decoding/reading).


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to