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

Re: export, checkout, commit performance

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-03-13 19:06:27 CET

Ivan Zhakov writes:
> On 3/13/06, Peter N. Lundblad <peter@famlundblad.se> wrote:
>
> > Also, we need to make sure that the whole text base is
> > read. I'm not sure if the txdelta generator will do that if the
> > working file is considerably shorter than the text base.
> I can't figure how txdelta can send delta without reading whole stream?
>

It needs to read the whole target, but not the whole source. The
delta algorithm will read one Window (100 kB) at a time from source
and target. If the target is longer than the source, the source is not
read to its end. (Note that the delta doesn't contain delete instructions.)

> > Maybe it is a
> > good idea to get rid of the read_all parameter of the
> > svn_stream_content_same function and instead create a new stream that
> > will "drain" its underlying stream when it is being closed. Thoughts?
> Yeah, I had similiar idea recently. But in this case we need extra
> allocations of read buffer. I don't know how it decrease performance.

Keep a flag whether the end of stream was reached. On close, if EOS
wasn't reached, just allocate a buffer and drain the stream. So you
only need the buffer if the reading was stopped early.

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 13 19:06:48 2006

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.