Re: [protobuf] Re: Efficiently reading/writing multiple messages in C++

2010-06-19 Thread Evan Jones
On Jun 18, 2010, at 17:06 , Kenton Varda wrote: But I doubt there is really much overhead in constructing a new CodedInputStream on the stack for each message. No heap space is allocated in the process. If I end up doing some performance intensive stuff with this code, I'll look into it

Re: [protobuf] Re: Efficiently reading/writing multiple messages in C++

2010-06-18 Thread Kenton Varda
You could reconstruct the stream every N bytes, where N limit. But I doubt there is really much overhead in constructing a new CodedInputStream on the stack for each message. No heap space is allocated in the process. I'd also be amenable to a method which resets the bytes counter. What we