On Thu, Jan 19, 2012 at 8:40 PM, Daniel Shahaf <danie...@elego.de> wrote: > hwri...@apache.org wrote on Thu, Jan 19, 2012 at 20:56:35 -0000: >> Author: hwright >> Date: Thu Jan 19 20:56:35 2012 >> New Revision: 1233566 >> >> URL: http://svn.apache.org/viewvc?rev=1233566&view=rev >> Log: >> Add a public wrapper around our spillbuf-backed stream. >> >> * subversion/include/svn_io.h >> (svn_stream_buffered): New. >> >> * subversion/libsvn_subr/stream.c >> (svn_stream_buffered): New. > > So, with this change, exported files of up to 100kB in size will be > processed in-memory, without being written to disk twice. Nice. :-)
On the ev2-export branch, yes. I haven't yet made a corresponding change on trunk, and I don't know of we even can with the existing editor implementation there. On the other hand, repos-to-wc copy used a similar paradigm, and that's been improved on trunk, so it's not a complete loss. :) > I do wonder if the "to disk" threshold should be in the public > signature, but don't have offhand a use-case justifying that. We could, but I figured callers who needed finer-grain control over the size of the buffer would use the underlying private API which gives them that ability. And as I noted in the code, the choice of 100k was completely arbitrary, the result of a lot of squinting and hand waving. If somebody has better guestimates (Stefan F.?) as to what would be better, feel free to improve upon it. -Hyrum -- uberSVN: Apache Subversion Made Easy http://www.uberSVN.com/