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.
Summary: | Graph tab is blocking the AWT on graph layouting | ||
---|---|---|---|
Product: | projects | Reporter: | crazyjavahacking |
Component: | Maven | Assignee: | Milos Kleint <mkleint> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esche, FrantaM, jglick, jtulach, ma.schroed, markiewb, misterm, myshkin, panason2008, pekarna, uwe_pachler, yoosiba |
Priority: | P3 | Keywords: | PATCH_AVAILABLE, PERFORMANCE, THREAD |
Version: | 7.3 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 161429 |
Attachments: |
Maven project to reproduce
nps snapshot nps snapshot Proposed patch |
Description
crazyjavahacking
2012-10-29 08:58:38 UTC
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]
nps snapshot
Saving Snapshot
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread org.netbeans.modules.sampler.InternalSampler@c3c6c4
Created attachment 131890 [details]
nps snapshot
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)? yes Created attachment 139138 [details]
Proposed patch
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) Changeset: http://hg.netbeans.org/main-silver/rev/586d0279e33c User: Milos Kleint <mkleint@netbeans.org> Log: #220995 for complex dependency trees don't show the graph immediately, only on user's request |