While using SSHTools in our project, we found that the performance for uploading large files ( > 1 MB) is very poor compared to what is possible by a manual transfer (via scp say) and even using another open source tool. As we have decided to use SSHTools, we did some changes in the code (for v 0.2.7) , and found that performance for this case is significantly faster now (possibly upto 10 times). I am detailing the defects we found that can hamper the performance for uploading large files, and attaching the changed files for v0.2.7 along with a README that explains the exact changes in each file that were done:
I found two inefficiencies –
1) The library is inefficient in sending the appropriate size of chunk of data to the server. So it ends up spending app. twice the time (in some cases) in encrypting and padding as opposed to what is actually required.
2) It blocks for the response from the server; this could be inefficient in some cases, such as upload of large files. Here you get ‘Window Adjust’ messages in between, and there may be a delay in the response for the data received from the server. But in such cases, the library will block; thus slowing it down considerably.
The attached zip contains the changed files. Can we have these changes incorporated into v0.2.7 (after your review of course), so that instead of we making any changes , we get these changes from the original writers, and have more faith in the product. I also believe these changes, if properly incorporated can help SSHTools library latest versions also (if these kind of changes are already not there).