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 169908 - [68cat] Inspect Hierarchy - Performance
Summary: [68cat] Inspect Hierarchy - Performance
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker with 2 votes (vote)
Assignee: Dusan Balek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-08-05 15:52 UTC by stefan79
Modified: 2012-09-13 11:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The Snapshot-File. (89.39 KB, application/octet-stream)
2009-08-05 15:52 UTC, stefan79
Details
Opened the file (11666 lines) and pressed Ctrl-F12 (find a Methdo). (249.00 KB, application/octet-stream)
2009-09-25 12:07 UTC, stefan79
Details
Opened the file (650 lines) and pressed Ctrl-F12 (find a Methdo). (78.21 KB, application/octet-stream)
2009-09-25 12:07 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2009-08-05 15:52:00 UTC
Inspect Hierarchy is very slow.
I have to wait some Minutes for the result!
I´ll attach a Snapshot while waiting for the "Show subtype hierarchy".

Tested with 6.8m1.

Product Version: NetBeans IDE Dev (Build 200908022240)
Java: 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02
System: Windows XP version 5.1 running on x86; Cp1252; de_AT (nb)
Userdir: G:\.netbeans\6.8m1
Comment 1 stefan79 2009-08-05 15:52:56 UTC
Created attachment 85855 [details]
The Snapshot-File.
Comment 2 stefan79 2009-09-25 12:07:09 UTC
Created attachment 88351 [details]
Opened the file (11666 lines) and pressed Ctrl-F12 (find a Methdo).
Comment 3 stefan79 2009-09-25 12:07:34 UTC
Created attachment 88352 [details]
Opened the file (650 lines) and pressed Ctrl-F12 (find a Methdo).
Comment 4 stefan79 2009-09-25 12:17:00 UTC
I removed NETWORK-DRIVE - Keyword, because I copied the server-files to a local partition and so I work only on local files.
Comment 5 Jiri Kovalsky 2009-10-06 13:30:20 UTC
This is a bug coming from NetCAT 6.8 participant.
Comment 6 ericjs 2010-02-11 19:02:34 UTC
As an Eclipse refugee this is a pain point to me (along with the several other feature gaps around class hierarchy browsing). Bringing up the hierarchy window is orders of magnitude slower in NetBeans. And there's no network drive in the equation for me

I just timed opening one of our larger type hierarchies (all within the same project) and it took 2 full minutes, all the while sucking like 40% CPU time, and 30% Kernal CPU time. (I actually see a lot of high kernal cpu usage from etBeans...not sure what that is about). It seems to take some time for the cpu usage (kernal and user) to go down again (like another couple of minutes) even after I've closed the hierarchy menu. It strikes me that something is seriously wrong there.

In eclipse this takes only a second or 2. 2 seconds vs 2 minutes does not just mean "better algorithm" it means something broken.

My setup:
Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.6.0_18; Java HotSpot(TM) Client VM 16.0-b13
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 7 ericjs 2010-02-11 19:24:41 UTC
This is a followup to me previous post. As I said it takes 2 minutes for this particular type hierarchy to come up. When it comes up, it shows the root of the tree collapsed. At this point it continues to suck 40% user, 30% kernal cpu time for another 2 minutes regardless of whether I close the window or leave it open.
Now if I leave it open, and explore the hierarchy, expanding branches of the tree control, an interesting thing happens when it reaches that point where it stops sucking CPU time. The tree suddenly collapses what I've expanded down to the 2nd level. That is, the root level is expanded so the top-level type and all of its children are shown, but nothing below that. (Different from the initial state of only the root level shown...and different than the variously expanded state that I'd put it into.)

This type hierarchy, btw, consists of about 80 different interfaces and classes and goes 4 levels deep at the deepest (meaning 4 nodes from root to leaf, including root and leaf).

I'd also like to note that expanding a node is always instant, suggesting that the whole tree is populated before anything is displayed. I don't know if this is the case with Eclipse; if they are only filling out the tree as needed, they might be gaining performance there, but it is not noticeably slow expanding branches there either.

I'd like to suggest that this feature is not simply poorly performing but blatantly broken and should be prioritized higher.
Comment 8 stefan79 2010-02-12 00:22:19 UTC
I can say, that´s much better since 6.8final, but eclipse is faster.

But I think, eclipse is faster, because they don´t show the complete tree.
They only show the methods after typing some letters (like in go to class).
Or is there any other dialog at eclipse?
Comment 9 ericjs 2010-02-12 09:31:56 UTC
(In reply to comment #8)
> I can say, that´s much better since 6.8final, but eclipse is faster.
> 
> But I think, eclipse is faster, because they don´t show the complete tree.
> They only show the methods after typing some letters (like in go to class).
> Or is there any other dialog at eclipse?

In eclipse I'm talking about either of two features. The Hierarchy view which is a dockable view, or the Quick Type Hierarchy feature which is a pop up view, both of which I would normally bring up by highlighting the name of a type in my code and right click selecting "Open Type Hierarchy" or "Quick Type Hierarchy" respectively. In both cases there is no typing of letters, but there may be other ways to access them when you have to enter the classname letter by letter while the system narrows down the possibilities, but I'm considering that part of an orthogonal behavior. I'm only concerned with the behavior of displaying the hierarchy from a full, known, class or interface name.

I've tried it again in Eclipse and I think I was wrong about it lazily building the tree. In the case of Quick Type Hierarchy, it shows the entire hierarchy expanded as soon as you bring it up. It still only takes a couple of seconds. The "Open Type Hierarchy" to bring up the dockable view brings it up only partially expanded. The very slight hesitation (less than 1/2 a second) in reacting to expanding a branch suggests to me they may be lazily building the GUI tree, though of course the data tree may or may not be already already populated. However since the Quick Hierarchy can display the 80 member hierarchy try in just a few seconds, this isn't really important.

Again I'm using release 6.8 (Build 200912041610), so I'm assuming that is equal or later than 6.8final.
Comment 10 Dusan Balek 2012-09-13 11:06:03 UTC
The inspect hierarchy dialog has been completely redesigned - see issue #211784 for more details.