Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] performance: creation of DependencyNode, DefaultArtifact and Dependency

Martin Koci wrote:

1) creates  many instances of
org.sonatype.aether.util.artifact.DefaultArtifact: ~ 1 290 948 instances
org.sonatype.aether.graph.Dependency  ~ 1 283 202 instances
Those instances cannot be GCed, relations come from
org.apache.maven.MavenProject

Can you detail all chains of objects/fields holding the artifact instances?

Also, how many dependencies does your workspace have in total?

The problem is that process takes too much time and consumes too much
memory.

What are the concrete numbers for "too much"?

B) Then: I noticed that when the same dependency is in "client" project
and also as a transitive dependency,  then is this DependencyNode
processed 2x: when I removed dependecies already present as transitive,
it improved performance a little bit.

Question: Is this assumption correct? Is better to have use "optimize"
pom.xml in this way?

Even after reading this twice, I have no clue what this paragraph means. Can you re-phrase?

Question: are there any tips how to optimize pom.xml to avoid
unnecessary object created during dependency resolving?

No.

For example, creates section<dependencyManagement>  new instances from
aether domain? We have a big<dependencyManagement>   section in parent
(for all 600 project) pom.xml.

Of course, dependency management is relevant for dependency resolution so at some point manifests in corresponding objects to process it. Those should however only be temporary and not persist once dependency resolution is done.


Benjamin


Back to the top