This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FTP very slow

 
Tom Simmons
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic