This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 170913 - Exclude Dependency candidate list is loading slow
Summary: Exclude Dependency candidate list is loading slow
Status: RESOLVED WORKSFORME
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P4 blocker (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-08-26 06:52 UTC by cyrill
Modified: 2010-12-09 14:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ThreadDump before the exclusion operation (19.70 KB, text/plain)
2009-08-26 07:48 UTC, cyrill
Details
ThreadDump after exclusion operation started (first) (19.67 KB, text/plain)
2009-08-26 07:49 UTC, cyrill
Details
Thread Dump after exclusion operation (second) (20.13 KB, text/plain)
2009-08-26 07:50 UTC, cyrill
Details
Thread Dump after exclusion operation (third) (19.89 KB, text/plain)
2009-08-26 07:50 UTC, cyrill
Details
Thread Dump after exclusion operation (fourth) (20.98 KB, text/plain)
2009-08-26 07:51 UTC, cyrill
Details
Thread Dump after exclusion operation has been finished (14.28 KB, text/plain)
2009-08-26 07:51 UTC, cyrill
Details
POM with huge amount of transitive dependencies (2.11 KB, text/plain)
2009-08-26 07:53 UTC, cyrill
Details
Settings file with the repositories (3.86 KB, text/plain)
2009-08-26 07:54 UTC, cyrill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cyrill 2009-08-26 06:52:09 UTC
While browsing the libraries of a  maven project, one can right-click on a library and choose the action "Exclude Dependecy". The POM will then have the 
corresponding exclude statement. At least it worked this way in Netbeans 6.5. In Netbeans 6.7, nothing happens. Even no red exception bullet in the lower 
right corner.

... but after some seconds (more than 30) or minutes, the exclude statement appears in the POM. But that operation should be very fast.


BTW: I am running JDK 6 on 10.5.8
Comment 1 Milos Kleint 2009-08-26 07:20:15 UTC
could you do a bunch of thread dumps right after the operation executes?
There can be multiple sources of trouble. The most probable one is that we need to create a tree of dependencies (not
the usual list) to figure what dependencies we shall add the exclusion element. I suppose it can take some time under
certain circumstances..
how many transitive dependencies do you have? was the exclusion added to multiple dependencies? do you have any snapshot
dependencies? do all of the dependencies (even transitive) provide a POM file in repository?
Comment 2 cyrill 2009-08-26 07:48:24 UTC
Created attachment 86660 [details]
ThreadDump before the exclusion operation
Comment 3 cyrill 2009-08-26 07:49:42 UTC
Created attachment 86661 [details]
ThreadDump after exclusion operation started (first)
Comment 4 cyrill 2009-08-26 07:50:22 UTC
Created attachment 86662 [details]
Thread Dump after exclusion operation (second)
Comment 5 cyrill 2009-08-26 07:50:44 UTC
Created attachment 86663 [details]
Thread Dump after exclusion operation (third)
Comment 6 cyrill 2009-08-26 07:51:09 UTC
Created attachment 86664 [details]
Thread Dump after exclusion operation (fourth)
Comment 7 cyrill 2009-08-26 07:51:38 UTC
Created attachment 86665 [details]
Thread Dump after exclusion operation has been finished
Comment 8 cyrill 2009-08-26 07:53:29 UTC
Created attachment 86666 [details]
POM with huge amount of transitive dependencies
Comment 9 cyrill 2009-08-26 07:54:08 UTC
Created attachment 86667 [details]
Settings file with the repositories
Comment 10 cyrill 2009-08-26 07:57:20 UTC
I have included some thread dumps. There are a lot of transitive dependencies (abount 50). I have attached the POM and the settings with the repositories for 
the project. I suspect that some of the transitive dependencies are snapshots - but I am not sure. But at least the POM files are all located in my local 
repository. I have downloaded them before excluding.
Comment 11 Milos Kleint 2009-08-26 08:11:09 UTC
thanks.

as suspected, the thread dumps reveal that network is touched during construction of the dependency tree. I guess the
only *fix* is to wrap everything into a progress indicator..
Comment 12 cyrill 2009-08-26 08:21:10 UTC
OK, but to wait for about 60 seconds to simply exlude a dependency is a bit long - even with a progress indicator. From a users perspective, this is not 
acceptable (without background information). Do you mean the construction of the whole tree minus the excluded dependency takes about 60 seconds?
Comment 13 Milos Kleint 2009-08-26 09:11:05 UTC
well I don't see a way to speed that up unfortunately. It's highly dependent on setup though.

org.apache.maven.shared.dependency.tree.DependencyTreeBuilder is a maven originated class that is capable of creating
the tree (used by the maven-dependency-plugin as well). The usual maven resolver that is processing the project doesn't
store the tree structure but turns it immediately to the flat list which is then missing the tree attributes (eg. all
paths to the transitive dependency - which is crucial to apply the exclusion(s) correctly)
We just call the treebuilder and wait for it to create the tree. That's the part that is possibly slow in some cases,
everything else shall be fairly fast..

when loading the project we use specially tweaked resolver/embedder that doesn't touch the network. it's fast but often
produces incomplete results. So we need to use the full blown embedder here, but run the risk of it downloading the
universe.. I don't see a way out..

Comment 14 Milos Kleint 2009-11-10 00:13:21 UTC
-> not for 6.8, we might get a speed improvement when migrating to latest maven3 builds in the future, but the work being done still needs to be done (get a dependency tree)
Comment 15 Antonin Nebuzelsky 2010-07-30 15:17:27 UTC
Reassigning to default owner.
Comment 16 Antonin Nebuzelsky 2010-12-09 14:08:14 UTC
I tried with the latest 7.0 daily build and exclusion of a dependency is fast.

7.0 includes Maven 3 mentioned above.

Can you please try with 7.0 Beta and confirm it is fast for you now? Thanks.