Re: Serialization time in C++ using protobuf

2009-03-19 Thread ShirishKul
Ok. Finally I was able to get 46.8804 milliseconds. This should be pretty sufficient for file size 300 KB generated by serializing the output. Thanks again. Regards, Shirish On Mar 19, 11:23 am, ShirishKul shirish...@gmail.com wrote: Hi Kenton, Thanks for pointing this out... I have not

Re: Serialization time in C++ using protobuf

2009-03-19 Thread Kenton Varda
On Wed, Mar 18, 2009 at 11:23 PM, ShirishKul shirish...@gmail.com wrote: Output in my case is a file to which i'm writing. But again, this doesn't seem to be matching with what your throughput is. Do I still need to make changes to seek more optimum results? What happens if you serialize to

Serialization time in C++ using protobuf

2009-03-18 Thread ShirishKul
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

Re: Serialization time in C++ using protobuf

2009-03-18 Thread Kenton Varda
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?