-
Notifications
You must be signed in to change notification settings - Fork 866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generating pom graph locks Apache Netbeans #8209
Comments
I personally don't think the graph is very useful, esp for large projects where it typically fails. I would probably rather remove it and open the dependency tree. |
This appears to get locked calling https://github.com/apache/netbeans/blob/master/java/java.graph/src/org/netbeans/modules/java/graph/FruchtermanReingoldLayout.java#L343 Which is called from a I think that code has logic issues that could be addressed. |
@mbien The dependency tree displays direct and transitive dependencies without preserving the relations between those. So there is a IMHO huge benefit using the graph. @neilcsmith-net Thx for pointing that out. I would prefer a repaired instead of a removed version. ;) |
those are the resolved dependencies. The graph could be replaced by a tree which shows the resolution process. Its all already there just only on a per-dependency basis, not per project. Graphs are a nice toy until you have more than 10 nodes on your screen. |
sure, added contribution welcome label. |
I'm going to have a look at at least breaking out of the infinite loop for NB25. Having a button that kills the IDE is not ideal! |
I've hopefully got a quick fix - could you check the dev build at https://github.com/apache/netbeans/actions/runs/13077814779/artifacts/2518340133 and see if it handles your project without locking up? I can replicate your issue on a large project of my own. With this fix, the graph appears in a few seconds. |
I tested a large project and it worked considerably faster. However, couldn't test it with my problem project. Sorry. |
To clarify, that means you weren't able to test the dev build with the failing project rather than it still failed with it? |
I use the graph occasionally to verify version conflicts and see how hard it will be to untangle them. So I agree with @wumpz this should not be removed. I did a quick test with the changes from @neilcsmith-net in #8217 (thanks for taking this on) and my observation is, that the graph is much less dense. That is two sided as less nodes fit into the visible space, on the other hand the network is more readable. In the end it is "different", but good. I agree, that usability could be better (scrolling with middle mouse button should not loose selection, zooming/moving could be improved, multiselection to rearrange groups of nodes would make it less of a hasle), but these are all not relevant here. |
good to see so much renewed interest in this area, lets get this in too for NB 26 #7777 to start somewhere with the salvage operation |
list with old jira duplicates #8217 (comment) (https://issues.apache.org/jira/browse/NETBEANS-2492 not directly related but might be easy to fix) |
@neilcsmith-net Correct. Now I am going to test the problem project. |
@neilcsmith-net The problem project works as well. Needed a minute, but opened the graph. |
Thanks! Yes, it's still CPU intensive, but glad it didn't lock up. I'm tempted to make that layout an option but not the default in a future release, and we probably need to find a way to make it cancellable. |
Apache NetBeans version
Apache NetBeans 24
What happened
I tried to open the graph view for a quite large pom.xml with many transitive dependencies.
This function (displaying "loading and constructing graph ... ") locks the complete IDE. Netbeans is unusable. Now after 5min or so I have to take it down using the task manager.
I expected, that
Language / Project Type / NetBeans Component
Multimodule Java Maven project
How to reproduce
Just open die Graph - View of a large pom.xml file.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows 11
JDK
Java 21
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: