tjibbevanderlaan / chromeos-filesystem-sftp

ChromeOS app to access SFTP server
https://chrome.google.com/webstore/detail/shared-network-folder-sft/gbheifiifcfekkamhepkeogobihicgmn
BSD 3-Clause "New" or "Revised" License
80 stars 21 forks source link

Read performance - larger SFTP request size #57

Closed fedoracooper closed 9 years ago

fedoracooper commented 9 years ago

Please take a look at these changes. I have gone from a 2K SFTP request size to 32K (based on JavaScript buffer size) and eliminated the intermediate vector of chars, which has approximately doubled my performance. I went from about 5 Mbit/sec to about 10 Mbit/sec on my local network.

I believe most of the gain is due to the large SFTP request size, even though the client always comes back with 2000 bytes at a time; libssh2 is actually pipelining the requests more efficiently behind the scenes.

yoichiro commented 9 years ago

@fedoracooper Thank you for this pull request! The diff looks good to me. I'll test and release this diff by tomorrow, probably.