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

Re: apr_file_copy performance on Win32

From: Michael Sweet <mike_at_easysw.com>
Date: 2004-11-02 22:07:26 CET

Will Dean wrote:
> "Peter N. Lundblad" <peter@famlundblad.se> wrote in message
> news:Pine.LNX.4.55.0411022054280.8648@fnapp.local...
>
>
>>I don't think BUFSIZ is the modern way of choosing a buffer size. Usually
>>one uses st_blksize from a stat call, but that seems not to be available
>>in APR.
>
>
> I don't think anthing 'stat' is particularly standard.

"stat" is a POSIX API... That said, st_blksize is just the inode
size of the underlying filesystem (on UNIX/Linux anyways) and says
nothing about the overhead of system calls, so...

> I would say
>
> #define APR_COPY_BLOCK_SIZE 65536
>
> would be as good a way of dealing with this as any.
> ...

If you were really anal about performance, you'd probably use a
small multiple of the st_blksize value, but I think 64k should be
safe enough...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 2 22:08:02 2004

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.