Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1384

Default existCommand might be slow in SshRepository when publishing

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3.0-RC1
    • 2.3.0-RC1
    • Core
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            basileus Vassili Jakovlev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: