You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/01/07 02:17:41 UTC
DO NOT REPLY [Bug 37897] - ftp task very slow when depends=yes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37897>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37897
------- Additional Comments From e17x-o9j5@spamex.com 2006-01-07 02:17 -------
I was taking a look at FTP.java task source code
http://svn.apache.org/viewcvs.cgi/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java?rev=278420&view=log
The problem looks like as I expected. sendFile() calls isUpToDate() which makes
calls ftp.listFiles(remoteFile);
So, if I have 224 files in the remote directory, there will be 224 ftp
transactions to test the timestamps. This is why it is so slow. I change one
file, and then execute my ftp task to ftp it, but instead of taking 1 second
it takes 50 seconds because it is doing 224 ftp.listFiles() and one
ftp.storeFile(). This could be optimized to do only one ftp.listFiles() and one
ftp.storeFile().
It looks like to optimize this, you need to look at the path selectors,e.g.
/usr/pronto/web/html/jsp/*.jsp, and do a listFiles() for the entire directory
"/usr/pronto/web/html/jsp", or is it possible to get the list of files, and then
make a single listFiles() request on only the jsp files in /usr/pronto/web/html/jsp?
I'm not familiar with the apache commons net library.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org