I am attaching an improved patch  on 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20103.

This patch speeds up FTP scanning against case sensitive file systems (when 
followsymlinks = true) when the include patterns are of the type 
some/very/long/path. 

The code autodetects whether the remote system is case sensitive. The way it is 
done is that if the system encounters a subdirectory called alpha and there is 
no subdirectory called ALPHA in the same path, it will attempt to cd to ALPHA.
If this fails, the code will draw the conclusion that the remote system is case 
sensitive. 

If the user did not set followsymlinks="false", then there is no reason to scan 
each path component of some/very/long/path to check the spelling. Trying to go 
directly to some/very/long/path will tell immediately if this path exists or 
not.

I will commit my patch in the next days if there are no comments.

Here are some results :

1  scan src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java 
2  scan src/main/**/*.java

(figures in milliseconds to run a scan)
system

Windows - hummingbird FTP server     

1-old    2063
1-new  2163
2-old    29573
2-new  29523

UNIX (cvs.apache.org)

1-old 197
1-new 48
2-old  1590
2-new 1443

Cheers,

Antoine

Reply via email to