This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I implemented java code to upload files to server with org.apache.commons.net.ftp.FTPClient.
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.