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

<cachefileset> on an empty configuration produces a very slow-to-evaluate fileset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.0-RC1
    • 2.3.0-RC1
    • Core
    • None
    • Ant 1.8.1
      Ivy 2.2.0-rc1

    Description

      If I declare a <cachefileset> for a configuration that is present but empty, I get a fileset that (as expected) matches no files.
      The problem is that when used, that fileset decides to match no files by recursively scanning all files starting from the current working directory (checked via strace and via a JVM thread dump)
      In our case, often the CWD is the top of our build tree, so this takes a very long time to work out that the fileset is in fact empty.

      Specifically, we're doing this (inside a macrodef)

      <ivy:cachefileset setid="@

      {module}.docdeps" conf="doc" type="javadoc.zip"/>
      <unzip dest="${target}/javadoc">
      <patternset>
      <include name="*/package-list"/>
      </patternset>
      <fileset refid="@{module}

      .docdeps"/>
      </unzip>

      and the unzip step takes a very, very, long time to do nothing when the "doc" conf is empty.
      If I replace the use of cachefileset with an explicit fileset that matches nothing, it runs fast as expected.

      Attachments

        Activity

          People

            hibou Nicolas Lalevée
            ojowett Oliver Jowett
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: