Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Transfer rates with the SFTP channel are extremely low. Command-line SFTP is about 10 times faster than JSch. It looks like there were similar performance problems in previous versions of JSch. These were related to the packet size being too small. Is this possibly the same bug? Or is there some configuration that can remedy this issue?
I tried a few things and transfer rates are great if I use ChannelSftp.get(String src, String dst). So when I let JSch manage all the streams everything is fine.
However, if I use ChannelSftp.get(String src) and use the stream to transfer the file, everything slows down. If I wrap the input stream in a BufferedInputStream with a large buffer things improve. However, it's still considerably slower than using ChannelSftp.get(String src, String dst).
Is it possible that the InputStream implementation returned by JSch is the bottleneck?