ssh2.cr icon indicating copy to clipboard operation
ssh2.cr copied to clipboard

Poor performance SFTPing files

Open valenciaj opened this issue 5 years ago • 1 comments

I try to copy from my server to local thru ssh2.cr and I observe a poor performance like this:

javier@XXXXXX:~/projects/crystal/backuper$ time ./backuper ~/.ssh/id_rsa awscli-bundle.zip 
11648371 bytes writed.

real	0m27,632s
user	0m0,568s
sys	0m0,204s

There are a better way to copy file than IO.copy from channel to File?

valenciaj avatar Mar 09 '20 15:03 valenciaj

Doing a cat on file instead SFTP:

javier@jvdesk:~/projects/crystal/backuper$ time ./backuper ~/.ssh/id_rsa awscli-bundle.zip 
11648371 bytes writed.

real	0m6,496s
user	0m0,403s
sys	0m0,270s

valenciaj avatar Mar 09 '20 15:03 valenciaj