ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
Subject bug #20103 - performance of FTPDirectoryScanner
Date Wed, 20 Aug 2003 12:27:31 GMT
I am attaching an improved patch  on

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/ 
2  scan src/main/**/*.java

(figures in milliseconds to run a scan)

Windows - hummingbird FTP server     

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


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


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message