Created attachment 126698 [details]
Maven project to reproduce
Graph tab is still blocking the whole UI even if there wasa fix to execute the graph creation outside EDT (I think using RequestProcessor).
The more dependencies would need to be processed, the longer the slowness would take.
Easily reproducible with standard Maven Java SE project with Atlassian JIRA dependency. See http://screencast.com/t/bHkmhogFftc.
NetBeans Dev 201210280001, JDK 6u34 32bit
cannot resist to note that the slowness bubble that appeared in your video and that you closed, when clicked provides fairly good way of reporting slowness bugs. It even provides you with automated way of reporting issues..
besides, atlassian-jira is not in central, what repository is it in?
Sorry, I just have repositories in my setting.xml and I forget to check it.
You can find the public Atlassian Repository and Jira atrifacts at https://maven.atlassian.com/content/groups/public/com/atlassian/jira/atlassian-jira/
*** Bug 220996 has been marked as a duplicate of this bug. ***
the problem lies in the layout algorithm that is slow to iteratively relayout large trees. Cannot be just posted to non-AWT thread.
when I click the bubble slowness popup and file the slowness on the server, I get to this issue 185319 which claims it's likely a jdk problem. but that supposed to be already fixed.
*** Bug 224396 has been marked as a duplicate of this bug. ***
Maybe there is some way to show the graph incrementally, i.e. displaying the dependencies closest to the project first, then adding in some transitive dependencies, then another batch, etc.? With the idea that if the rendering gets slower each time, at least you would have the chance to switch to a different tab before you are completely screwed.
Created attachment 131455 [details]
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread org.netbeans.modules.sampler.InternalSampler@c3c6c4
Created attachment 131890 [details]
just open "graph" view in pom.xml
This is such a constant annoyance I think _something_ needs to be done about it. Possibilities:
1. Incremental display as in comment #8.
2. Move the graph tab to a separate plugin (preferably on AU) so you can turn it off.
3. Show nothing in the tab by default, just a label warning you that layout can be very expensive and a button confirming that you want to proceed.
Another issue is that the graph is redisplayed if the POM is reloaded, e.g. if you save some changes; and this happens even if the graph tab is not currently displayed! Instead the graph tab should just show a warning label that it is out of date, and give you a button to refresh it.
Ongoing problem for people like me with projects with deep dependency graphs. Would you accept a patch e.g. for option #3 (which seems the simplest one)?
(In reply to Jesse Glick from comment #12)
> Ongoing problem for people like me with projects with deep dependency
> graphs. Would you accept a patch e.g. for option #3 (which seems the
> simplest one)?
Created attachment 139138 [details]
Attached patch just adds a button ‘Show Graph’ to the start of the toolbar. When the tab is opened, initially nothing is shown; this prevents the IDE from freezing just because you are cycling through tabs or looking around. If and when you click the new button, the graph is displayed (which can still freeze for a while). If the model changes subsequently, the stale graph is hidden and a different label is displayed; you can choose to click the button to show a new graph, but if you do not, no work is done, so there is no performance overhead to editing dependencies etc. after having once shown the graph.
the patch looks good, just one UI comment,
why did create a toolbar button instead of adding the button to the text that appears in the middle of the view?
The button could have been added to the label in the middle of the view, I just thought it would look odd. If you would prefer it that way, it should be easy enough to implement.
(In reply to Jesse Glick from comment #16)
> The button could have been added to the label in the middle of the view, I
> just thought it would look odd. If you would prefer it that way, it should
> be easy enough to implement.
on second thought, maybe it's better to have it at well defined place.
I will integrate the patch with the UI "as is" however I'd like to experiment with setting some complexity boundary on the button to appear. Eg. when the number of maven dependencies is greater than 20.
Integrated into 'main-silver', will be available in build *201308290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Milos Kleint <email@example.com>
Log: #220995 for complex dependency trees don't show the graph immediately, only on user's request