Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] About DefaultDependencyCollector API performance

Hi Benjamin,
  Sorry for the confusion. What I mean "processing" is simply the method "private void processDependency()"
If you put below lines:

System.err.println("processing dependency: " + dependency);

to this method:

private void processDependency( Args args, Results results, List<RemoteRepository> repositories,
                                    DependencySelector depSelector, DependencyManager depManager,
                                    DependencyTraverser depTraverser, VersionFilter verFilter, Dependency dependency,
                                    List<Artifact> relocations, boolean disableVersionManagement )


Then run the test case DefaultDependencyCollectorTest#testCollectMultipleDependencies()

You will get the output:
processing dependency: gid:aid:ext:ver (compile)
processing dependency: gid:aid2:ext:ver (compile)
processing dependency: gid:aid2:ext:ver (compile)
[DEBUG] Dependency collection stats: {DefaultDependencyCollector.collectTime=46, DefaultDependencyCollector.transformTime=0}

Here gid:aid2:ext is processed second times. For complicated projects, you may have more duplications.
Not sure if it is appropriate to reuse the dependency already processed.

Thanks,
Eric

-----Original Message-----
From: aether-users-bounces@xxxxxxxxxxx [mailto:aether-users-bounces@xxxxxxxxxxx] On Behalf Of Benjamin Bentmann
Sent: Friday, June 20, 2014 12:30 AM
To: aether-users@xxxxxxxxxxx
Subject: Re: [aether-users] About DefaultDependencyCollector API performance

Eric wrote:

> I have 20 projects in my eclipse workspace, and most of the projects having same direct or transitive dependencies...
> Ex: for project A, it has library lib-1, lib-2 For project B, it has 
> library lib-2, lib-3
>
> I see lib-2 are processed 2 times, and recursively, if lib-2 and lib-3 both reference lib-4, lib-4 are also processed for 2 times.
> Like the low level library jdom are processed many times when updating project configurations with m2e.
> Is there a possibility to reuse the same library to avoid processing the same library multiple times?

Aether already caches various bits used for dependency collection but I don't know to what degree these caches are employed by m2e or whether they even address what you vaguely describe as "processing".

Without something concrete (as in runnable by somebody else) that demonstrates your performance issue, I can't help much further.


Benjamin
_______________________________________________
aether-users mailing list
aether-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aether-users


Back to the top