aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes FTP very slow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "FTP very slow" Watch "FTP very slow" New topic
Author

FTP very slow

Tom Simmons
Greenhorn

Joined: Nov 16, 2010
Posts: 11
Afternoon All

Not quite sure if this is the right forum section...

I need to implement FTP transfer in a program I support. First time playing with FTP in Java so I knocked up a quick program see what was needed and got some disappoiting results.

If I use FileZilla or the DOS bases FTP command to transfer the 2.37MB test file, it takes about 6 seconds. Using either Commons Net of sun.net.ftp I get 20-30 seconds.

Can anyone shed any light on why there is such a difference?

Apologies for the huge post, but it wouldn't let me attach .java, .txt or .zip files!

Tom

Commons Appraoch


Sun Approach


Tom Simmons
Greenhorn

Joined: Nov 16, 2010
Posts: 11
Having installed Wireshark I think I might have found something...

With Wireshark I was able to see that when using FileZilla each dollop of data sent was 1360 bytes, however checked the Java approaches the dollops ranged from 688 to 1360 bytes.

I tried adding a buffered read, just in case...


It made no difference.


Tom
 
jQuery in Action, 2nd edition
 
subject: FTP very slow