On Wed, Jan 13, 2010 at 3:02 PM, Jacob Rief <jacob.r...@gmail.com> wrote:

> Currently the only feasible solution is to
> replace the current FileInputStream object by a new one - which,
> somehow is quite inefficient!

What makes you think it is inefficient?  It does mean the buffer has to be
re-allocated but with a decent malloc implementation that shouldn't take
long.  Certainly the actual reading from the file would take longer.  Have
you seen performance problems with this approach?

> Wouldn't it make sense to add a member function which resets a
> FileInputStream to the state of a natively opened and repositioned
> file descriptor?

If there really is a performance problem with allocating new objects, then
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to proto...@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.

Reply via email to