Re: [PATCH] Vastly improve GnomeVFS xfer performance



On Sun, 2006-03-12 at 16:12 +0100, Christian Neumair wrote:
> The attached patch vastly improves the Xfer perfomance of GnomeVFS, in
> particular the sftp performance.
> 
> Changes
> 
> * When copying file data, consider both the source and the target I/O
> block size, reading with source block-sized buffer, writing with target
> block-sized buffer. It could be further refined with odd I/O block sizes
> (cf. the FIXME comment).

The block size is not in any way a limit, its more like a hint to the
minimal size and good block size multiple to the app doing i/o, so I
believe just using MAX(source-size, target-size) as one buffer is as
good as using both sizes in more complicated ways. 

Also, the way you loop reading from the source in order to get at least
isn't ideal. If you're reading from a slow source you'd block reading
for quite some time before even starting to write to the target. What
you want to do is to request enough data so that you could send a large
block to the target if you got it all, but if you don't get it you
should still send what you got instead of waiting, leaving the target
idle.

Anyway, good work! 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a benighted hunchbacked barbarian with a winning smile and a way with the 
ladies. She's a psychotic tempestuous mermaid with an incredible destiny. They 
fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]