I'm trying to track down the reason that our builds take much longer to build
under 3.0.3 rather than 3.0b1. Under 3.0.3, our build takes around 9
minutes, whereas under 3.0b1, it's 3 minutes and 30 seconds.

While using jconsole, I saw that most of the time (in 3.0.3) is spent inside
DefaultProjectDependenciesResolver.java. So I downloaded the source to both
3.0b1 and 3.0.3 to see what's happening. I noticed that in 3.0.3 there are
two versions of the class. One is in org.apache.maven.project, while the
other is in org.apache.maven. It also appears that in 3.0.3, the former is
being used. 

While stepping through the code, I saw that bulk of the time is spent when
it reaches this statement:


node = repoSystem.collectDependencies( session, collect ).getRoot();


In 3.0b1, the code does:


ArtifactResolutionResult result = repositorySystem.resolve( request );


I also noticed that respositorySystem is of the RepositorySystem, and the
concrete implementation is LegacyRepositorySystem. I'm assuming that this
was being used while the Maven 3 was in beta until the new implementation
was created?

Going back to 3.0.3, the collectDependencies method lives in
DefaultRepositorySystem.java which is part of
org.sonatype.aether.impl.internal. This eventually calls collectDependencies
inside DefaultDependencyCollector.java which is also part of
org.sonatype.aether.impl.internal. I'm assuming that this is how the
dependency graph is built.

My question is if there is a way to make this process faster? Could there be
something wrong in the way we've set up our dependencies in our project
which could cause this process to be so slow? 

--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-3-builds-take-much-longer-to-run-in-3-0-3-than-in-3-0b1-tp4587257p4587257.html
Sent from the Maven - Users mailing list archive at Nabble.com.

Reply via email to