First, are you using: option optimize_for = SPEED; ? If not, add that line to your .proto file. But even without that option, the speed shouldn't be that slow. Maybe you can run in a profiler to see what's taking so long?
Are you writing to an in-memory buffer or some sort of output stream? Is it possible that the stream is blocking? For reference, most of my C++ serialization benchmarks get around 250-500 MB/s with optimize_for = SPEED and 15-25 MB/s without it. On Wed, Mar 18, 2009 at 10:24 PM, ShirishKul <shirish...@gmail.com> wrote: > > I used protobuf to serialize an object in C++. The size of binary was > around 300 KB and time taken was 1359.4098 milliseconds. I wonder why > it took so much of time at C++ , where as, at java side - > serialization of similar object took 39.62626263 milliseconds. > > I've seen SerializeToOSteam took around 1.28 seconds of the time in > case of C++. > > I'm i missing something? Any pointers to this would be highly > appreciated. > > Thanks, > Shirish > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---