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 173545 - OutlineView & property editors stall application
Summary: OutlineView & property editors stall application
Status: RESOLVED INCOMPLETE
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-02 05:53 UTC by maxnitribitt
Modified: 2009-10-09 14:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description maxnitribitt 2009-10-02 05:53:34 UTC
When displaying a larger hierarchy, e.g. displaying a filesystem hierarchy with all nodes expanded and mousing over
Strings to display TooltipTexts and sometimes clicking in the table, the UI stalls longer and longer trying to display
the tooltiptext of the string and never recovers. I've reproduced this on different platforms (XP, OS X) and with
different models.

For reproducing the bug you can use this in your TopComponent's constructor:

outlineView = new OutlineView();
FileObject fo = FileUtil.getConfigRoot();
try {
   DataObject dao = DataObject.find(fo);
   Node root = dao.getNodeDelegate();
   outlineView.setProperties(root.getPropertySets()[0].getProperties());
   explorermanager.setRootContext(root);
} catch (DataObjectNotFoundException ex) {
   Exceptions.printStackTrace(ex);
}
add(outlineView, BorderLayout.CENTER);

and to expand all nodes:
    @Override
    protected void componentShowing() {
        super.componentShowing();
        if (firsttime) {
            firsttime = false;
            expandAllNodes(explorermanager.getRootContext());
        }
    }

    private void expandAllNodes(Node root) {
        outlineView.expandNode(root);
        Children children = root.getChildren();
        Node[] childNodes = children.getNodes();
        for (int i = 0; i < childNodes.length; i++) {
            Node node = childNodes[i];
            expandAllNodes(node);
        }
    }


Workaround:

1. Disabling editors fixes the above problem, but it's not really a workaround, because you're loosing functionality
2. Use TreeTableView - also not really a workaround
Comment 1 Jiri Rechtacek 2009-10-02 10:36:23 UTC
I need to know which release of NetBeans RCP are you using. Furhermore, I don't see what is a problem is? Is it slow? Or
a deadlock? Thanks
Comment 2 maxnitribitt 2009-10-03 16:39:06 UTC
Tested with 6.7.1 and 6.8 m1. It first blocks the application for short intervalls, like 2 or 3 second which get longer
every time until the application doesn't respond anymore. I.e. it doesn't respond on mouseclick, dioesn't repaint on
resize, etc. while using lots of CPU.
Comment 3 Jiri Rechtacek 2009-10-07 14:16:01 UTC
I'm evaluating it...
Comment 4 Jiri Rechtacek 2009-10-09 11:57:30 UTC
I created a OutlineView TopComponent using your snippets and worked pretty good and not so slow. A possible slowness
might be caused by generating display names of some nodes(based by XML content where get display name caused parsing XML
content). So, in my point of view there is no OutlineView performance problem. If I'm wrong, I need a snapshot of
heapstack - use profiler's button on right size of IDE toolbar (or Alt-Shift-Y) in NetBeans IDE 6.8 M2. Thanks
Comment 5 maxnitribitt 2009-10-09 14:58:03 UTC
Did you follow the steps I described clicking and mouse over? Maybe it's important to scroll in the hierarchie as
well... Unfortunately the way to reproduce this is much harder to describe than to show :-).

I'm also asking because I (and others) were able to reproduce this across different versions, OSes machines and totally
different Node hierarchies and it consistently fails after a very short time (around 30 seconds). 

It won't be possible to create a snapshot when the application uses the "final state". But I'll try to do it a few
moments before that...