On 6 September 2011 02:56, liuzl <xie...@gmail.com> wrote: > When sending a internal packet(eg:window adjust packet), > even we may blocked in the last call, try to send it normally > > Signed-off-by: liuzl <xie...@gmail.com> > --- > src/channel.c | 37 +++++++------------------------------ > src/transport.c | 12 +++++++++++- > 2 files changed, 18 insertions(+), 31 deletions(-)
Thanks for the patch. It works in as much as libssh2_sftp_read with a 6MB buffer no longer blocks on the first attempt. The first read is very quickly successful. However, subsequent reads are very slow. They cause 100% CPU usage and the teeny script, based on the standard example code with a 6MB buffer, uses 50-75 MB of memory. >From watching the network meter, it seems that the 6MBs of data is transferred in a fraction of a second but that libssh2 spends the rest of the time reassembling it before returning from libssh2_sftp_read. Alex _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel