Vassili created IVY-1384:
----------------------------

             Summary: Default existCommand might be slow in SshRepository when 
publishing
                 Key: IVY-1384
                 URL: https://issues.apache.org/jira/browse/IVY-1384
             Project: Ivy
          Issue Type: Improvement
          Components: Core
    Affects Versions: 2.3.0-RC1
            Reporter: Vassili
            Priority: Minor
             Fix For: 2.3.0-RC1


Default command for checking directory or file existence in SshRepository is 
"ls". Execution of that command for checking directory existence might be very 
slow, if directory contains a lot of files - all because "ls" searches for all 
files in a directory and returns them as a list.

In our case we have a project that publishes 8 artifacts into a single "jars" 
directory. Since we publish a version after almost every commit, so in three 
years there are ~10000 artifacts published (and also two .md5 and .sha1 files 
for each artifact, totally ~30000 files) in that directory. Listing of that 
directory together with data transfer via ssh takes ~6 seconds. When I replaced 
"ls" command with "test -e" in repository configuration, then the same 
operation took ~0.15 seconds - 40x times faster! Taking in consideration the 
fact that result of this command in not cached and command is executed several 
times during the publishing process, our measurements show that we have 
decreased publishing time from 5 minutes to 1 minute.

So I suggest setting "test -e" as a default value for existCommand variable.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to