HOW TO SPEED UP 3X:
in file SftpFileStream.cs is predefined too small buffer - 4096 bytes is not enought.
ORIGINAL:
_
you also have to change buffer size check, to go thru
_
It is difficult go deeper.
in file SftpFileStream.cs is predefined too small buffer - 4096 bytes is not enought.
ORIGINAL:
_
internal SftpFileStream(SftpSession session, string path, FileMode mode)
: this(session, path, mode, FileAccess.ReadWrite, __4096__, false)
{
// Nothing to do here.
}
internal SftpFileStream(SftpSession session, string path, FileMode mode, FileAccess access)
: this(session, path, mode, access,__4096__, false)
{
// Nothing to do here.
}_
Change it to bigger, min 65536 or up.you also have to change buffer size check, to go thru
_
internal SftpFileStream(SftpSession session, string path, FileMode mode, FileAccess access, int bufferSize, bool useAsync)
if (bufferSize <= 0 || bufferSize > __16__ * 1024)
{
throw new ArgumentOutOfRangeException("bufferSize");
}_
It will speed up 3x, but it still about 3x slower than others (I compare to winscp).It is difficult go deeper.