[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1698359 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/stream.c svnadmin/svnadmin.c svnfsfs/load-index-cmd.c tests/libsvn_subr/stream-test.c

From: Evgeny Kotkov <evgeny.kotkov_at_visualsvn.com>
Date: Sat, 29 Aug 2015 17:57:45 +0300

Hi Stefan,

Stefan Fuhrmann <stefan2_at_apache.org> writes:

> Introduce a stream wrapper object that adds mark/seek support to any
> readable stream. Use it on the stdin streams in our CL tools.


What happens if someone calls svn_stream_mark(stream, &mark, pool) on the
stream and then — perhaps, much later — reads a huge amount of data from the
stream? Say, the total amount of data to read is 8 GiB, and it's processed in
small chunks. Is it true that in this case all 8 GiB of data are going to be
buffered by the stream and kept in memory?

Here is an quick example:

 SVN_ERR(svn_stream_mark(buffered_stream, &mark, pool));

 while (!eof)
     svn_stringbuf_t *str;


     SVN_ERR(svn_stream_readline(buffered_stream, &str, "\n", &eof, iterpool));

Evgeny Kotkov
Received on 2015-08-29 16:58:08 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.