This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I improve FTP upload speed for multiple files  RSS feed

Urairat Yusuk
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I implemented java code to upload files to server with

Following is example code:

When I uploaded 1500 files (each file is about 1-20 KB),it took about 49406 - 51000 millisec (This is upload time only).
I would like to improve the speed.

How should I do?

-Change library? What is the powerful FTP client class library for uploading multiple files?
Some people suggest me to use ftp4j, but when I test the library with 1500 files, the upload speed of ftp4j is slowly than FTPClient. It took about 60000 millisec

Following is a sample ftp4j code:

-Use multiple threads? How can I implement ftp upload function with multiple threads? Could someone show me an example? I am a new for multiple threading programming.

I try to use multiple threads like following code:

Is it correct? It work correctly but it cannot improve speed. It took about 49000 - 51000 millisec same as the code without thread

PS. I test the speed with intranet. It will take more time for internet.

Somebody can help me?

Thanks in advance
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!