[ 
https://issues.apache.org/jira/browse/MNG-5896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15071889#comment-15071889
 ] 

Harald Wellmann commented on MNG-5896:
--------------------------------------

With a [proposed 
solution|https://github.com/hwellmann/aether-core/commit/cdab4c40094ccf621370647f83ecda54684066ce]
 for this issue in {{aether-core}}, I tested dependency collection using a test 
case similar to 
{{org.apache.maven.repository.internal.RepositorySystemTest.testCollectDependencies()}}
 for a number of artifacts, always starting with an empty local repository.

The tests were run with a current Maven 3.4.0-SNAPSHOT, with and without the 
Aether patch applied:

Here are some results:

|||Artifact||unpatched||patched||
|org.apache.maven.plugins:maven-release-plugin:2.5.3|27.3 s|17.5 s|
|org.seleniumhq.selenium:selenium-java:2.48.2|15.8 s|7.6 s|
|org.apache.openejb:tomee-webapp:1.7.3|29.5 s|16.1 s|

The tests directly access Maven Central.

The effect of the patch is even more noticeable when Maven Central is mirrored 
by a repository manager, where the added latency of the repository manager 
acting as a proxy has a negative impact on downloading a lot of small files 
like POMs.

> Download dependency POMs in parallel
> ------------------------------------
>
>                 Key: MNG-5896
>                 URL: https://issues.apache.org/jira/browse/MNG-5896
>             Project: Maven
>          Issue Type: Improvement
>          Components: Dependencies
>    Affects Versions: 3.3.3
>            Reporter: Harald Wellmann
>
> h3. Background
> When building a project with dependencies not yet available in the local 
> repository, I noticed that Maven 3.3.3 first downloads the dependency POMs 
> _sequentially_ and then proceeds downloading the dependency JARs with up to 5 
> threads _in parallel_.
> Due to this, when first building a project with a large number of 
> dependencies, downloading a large number of small POMs may take a lot longer 
> than downloading the much larger JARs, or even longer than building the 
> project itself, especially when a repository manager is used which increases 
> the download latency.
> h3. Enhancement
> Download POMs of (transitive) dependencies in parallel to significantly speed 
> up initial builds of large projects.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to