[RFC] Extract unannotated texts from Knits

Robert Collins robertc at robertcollins.net
Thu Jul 26 00:20:30 BST 2007


On Wed, 2007-07-25 at 14:29 -0500, John Arbash Meinel wrote:
> 
> Profiling seems to put file.close() as 1s (which is the time it is
> writing out
> data). Which is extra strange since cp -ar is able to do it in 300ms.
> I at
> least wonder if cp is able to do things with memmap files, rather than
> direct
> access. 

What OS is this on? On linux at least, closing the file handle does not
guarantee data flushing. (man 1 close says:
"""A successful close does not guarantee that the data has been
successfully saved to disk, as the kernel defers writes. It is not
common for a filesystem to flush the buffers when the stream is closed.
       If you need to be sure that the data is physically stored use
fsync(2).  (It will depend on the disk hardware at this point.)
"""

If you are seeing a slow close it may be that the file handle is
buffered at the stdio layer, and its being flushed from there. There are
what 650 files being written? So thats 1023/650=1.2ms per close call
which seems far to small to represent actual disk seek and write times.

stracing the checkout may give more insight.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070726/3a67edda/attachment.pgp 


More information about the bazaar mailing list