[Patch] Addon to 'Fish uploads slowly' patch -- better fallback
buc
buc at odusz.so-cdu.ru
Tue Nov 30 17:32:09 UTC 2004
Hi,
It is an addition to previously posted patch which solve too slow FISH
uploads (" head || dd " )
Possible, I have found a better way for fallback. It is several times
faster than initial
"dd bs=1 count=%lu" ...
The idea is we use shell loop as this:
while :
do
set @@@ `ls -l <filename>`
[ $6 -lt <size> ] && dd bs=4096 count=1 || break
done
Note: `@@@' is ised to avoid "option-like" interpretation of `ls' output.
Each invokation `dd' reads only once ("count=1"), with maximum amount
of 4096 bytes. Actually, reading occurs in smaller portions - as `ssh'
put data in the pipe.
We never read the extra data because MC do not give us anything more
until we echo status code to it.
This way successfully tested by us in the GNU/non-GNU environment.
The patch attached, it should be applied after previous posted patch.
--
Dmitry Butskoj <Dmitry at Butskoj.name>
Saint-Petersburg, Russia
Red Hat Certified Engineer 809003662809495
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mc-4.6.1-fish1.patch
Type: text/x-patch
Size: 1331 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20041130/de2cdb59/attachment.bin>
More information about the mc-devel
mailing list