I am using 2.1.0 and as shown above the proto file uses option
optimize_for = SPEED;
On Aug 17, 8:56 pm, Kenton Varda ken...@google.com wrote:
What version of protocol buffers are you using? If it's 2.0.3 or previous
then you need to put this line in your proto files:
option optimize_for =
On Mon, Aug 17, 2009 at 10:21 AM, George Georgiev
georgi.georg...@citrix.com wrote:
Thanks,
Everything looks good now, except default values. I love the fact that if
the default value is explicitly stored in the message it override the base
value, and it doesn't if it is not. Am I right?
FWIW, one way to make your life a lot easier might be to statically link
against libprotobuf. That way you do not need to distribute anything, and
you do not need to distribute a new package when you update to a new version
of protocol buffers. This is the approach we take at Google -- we
I've actually worked on something like that recently, but tied to a
particular use case. I think you'll find it pretty hard to solve the
problem in a completely general-purpose way, unless you end up writing a
code generator of some sort. In order to hide the UIDs from the app, you
will need to
I have now also tried parseDelimitedFrom() and writeDelimitedTo. The
performance difference is still by a factor of almost 2:
Average Java time: 154333 nanosecs
Average PB time: 293566 nanosecs
Average Java time: 149934 nanosecs
Average PB time: 275076 nanosecs
I will try with a bigger message
A message with three primitive fields should only take a couple hundred
nanoseconds to parse or serialize, unless the strings are *huge*. I have to
believe that something is wrong with the setup.
On Mon, Aug 17, 2009 at 1:53 PM, Tai maitai.tru...@gmail.com wrote:
I have now also tried
Folks, sorry for the delayed response to this thread.
We are currently investigating this issue and assuming the problem to be in
our setup and not protocol-buffer libs (using protobuf 2.1.0 for time
being).
For clarification we are using G++ 4.1.1
thanks,
Sushil
On Fri, Aug 14, 2009 at 2:19
That's a good point. I'm only going to be distributing a few binaries
that have to link against libprotobuf so that's probably a better
idea.
Thanks,
Pete
On Mon, Aug 17, 2009 at 1:13 PM, Kenton Vardaken...@google.com wrote:
FWIW, one way to make your life a lot easier might be to statically
(oops, ignore the double-click!)
From ProtoContract, I'm taking this to be a protobuf-net question.
No, it doesn't currently offer a way to serialize structs; the main
reason for this being that structs should pretty-much always be
immutable, which makes a reflection-based API (such as