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

Re: numerous small 512 byte working copy reads and writes

From: <kmradke_at_rockwellcollins.com>
Date: 2007-12-17 21:07:10 CET

"Erik Huelsmann" <ehuels@gmail.com> wrote on 12/17/2007 04:59:58 AM:
> On 12/17/07, Karl Fogel <kfogel@red-bean.com> wrote:
> > kmradke@rockwellcollins.com writes:
> > > For example:
> > >
> > > READ C:\docs\.svn\tmp\text-base\svn-book.pdf.svn-base SUCCESS
> > > Offset: 0 Length: 512
[...]
> > > Offset: 1351168 Length: 512
> > >
> > >
> > > A few things I noticed:
> > >
> > > 1) A file is named .tmp.tmp and stored in a "tmp" directory.
> > > Isn't that a little redundant?
> > >
> > > 2) It appears to be reading the text-base file 512 bytes at a time
> > > and then writing the (same???) 512 bytes out to the temp file.
> > > Isn't that buffer size fairly small and inefficient?
> > > Probably not noticeable on a local disk, but is quite an
> > > impact when on a high latency network where the 512 byte packets
> > > are acknowledged before the next one is transmitted.
> > >
> > > I'm hoping someone familiar with the working copy code can comment
on
> > > this behavior. I'd be willing to dig into this a little deeper,
provided
> > > someone that knows the code better doesn't give a valid reason for
the
> > > small buffer sizes. (I'll admit I am completely ignorant of the
> > > working copy code, but I'm always willing to learn.)
> >
> > I don't have time to trace that buffer size down, but if you do,
> > please let us know where it's happening. I too would expect the code
> > to be using a much larger buffer size than that!
>
> The buffer size comes from BUFSIZ which is used to copy files in APR.
> They probably use BUFSIZ because the definition of the constant is
> that it should return a buffer size for efficiently doing file IO.
>
> Probably the CRT he's using is defining BUFSIZ to 512... (Which I
> agree, is quite small...)

Thanks for the pointers. I was wondering if it could be an APR issue.

I haven't yet verified, but I assume the windows command line client is
compiled with visual studio, which would use the standard Microsoft C
runtime.

I'll also test the 1.4.5 version as well as TortoiseSVN to see if they
suffer from the similar small buffer issues.

Kevin R.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 17 21:07:23 2007

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.