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

Re: [TSVN] File writing performance

From: Simon Large <slarge_at_slarge.plus.com>
Date: 2005-06-30 12:48:56 CEST

Will Dean wrote:
> Both these write an identical 4000000 byte file.
> On my machine here, you get results which look like this:
>
> C Stream time: 41ms
> W32 time: 3810ms

The stdio library (at least in the good-old days) uses a 512 byte
internal buffer and only does a system call when that buffer is full. In
your example that would reduce syscalls by a factor of 128, which is
consistent with the x92 improvement. I suspect that even with a good
windows cache, the internals of a WriteFile call are so tortuous that it
is almost as bad as the old DOS calls which write a single byte directly
onto the disk. Now, as then, anything which avoids diving into the OS
will most likely save a bundle of time.

Simon

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jun 30 13:19:39 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.