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

Re: svn commit: r1233566 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/stream.c

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Thu, 19 Jan 2012 21:47:51 -0600

On Thu, Jan 19, 2012 at 8:40 PM, Daniel Shahaf <danielsh_at_elego.de> wrote:
> hwright_at_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/
Received on 2012-01-20 04:48:28 CET

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