Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-404

mvn 3.0.4 is extreemly slow with a large number of "import" dependencies.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • 2.4
    • None
    • tree
    • None
    • Linux skhalipau.internal.corp 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    Description

      In comparison with maven 2.2.1 resolving of dependencies with scope "import" is very slow in maven 3.
      Example results for "mvn dependency:tree" in one my project: maven 2.2.1 says "[INFO] Total time: 8 seconds" but 3.0.4 "[INFO] Total time: 13:02.069s". Resulting trees are identical.

      I profiled the code and found that maven 3 did not cache parsed pom files but it reads and parses one pom file every time when it find it in imported dependencies. So the method org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement() is called many times for one artifact. There is JProfiler result for "mvn dependency:tree" in attachment.

      Attachments

        1. stacktrace.txt
          11 kB
          Siarhei Khalipau
        2. mvn_3.0.4_dependency_tree.log
          31 kB
          Siarhei Khalipau
        3. mvn_2.2.1_dependency_tree.log
          29 kB
          Siarhei Khalipau
        4. jprofiler_mvn_dependency_tree.tar.bz2
          11 kB
          Siarhei Khalipau
        5. dep-tree-maven-3.0.5.log
          24 kB
          Zilvinas Vilutis
        6. dep-tree-maven-2.2.1.log
          24 kB
          Zilvinas Vilutis

        Issue Links

          Activity

            People

              Unassigned Unassigned
              haruda Siarhei Khalipau
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: