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 52607 - Each change of activated node immediately invokes parsing
Summary: Each change of activated node immediately invokes parsing
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: David Simonek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-12-17 14:24 UTC by Antonin Nebuzelsky
Modified: 2006-03-24 12:56 UTC (History)
2 users (show)

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 Antonin Nebuzelsky 2004-12-17 14:24:39 UTC
Each change of activated node (switching between
editor tabs, navigating in explorer) immediately
invokes parsing. And the parsing is effectively
blocking UI for a long time. This makes navigation
in Explorer and between editor tabs very hard.
Comment 1 _ tboudreau 2004-12-20 15:39:52 UTC
"effectively blocking the UI" - it would be nice to nail down exactly what is being blocked 
and who blocks it - Navigator builds its member list in a background thread, never the 
AWT thread.  This code will run when you change tabs, to build a list for a class, but I 
suspect that (unless I did something really stupid), the code that actually blocks AWT is 
some other code (code folding?) which is blocked on Navigator's use of the MDR 
transaction lock.
Comment 2 David Simonek 2004-12-22 19:35:33 UTC
Improved a lot by this fix:

navigator/javanavigation/src/org/netbeans/modules/javanavigation/ClassMemberModel.java;
new revision: 1.10; previous revision: 1.9

navigator/javanavigation/src/org/netbeans/modules/javanavigation/InheritanceTreeModel.java;
new revision: 1.5; previous revision: 1.4

navigator/javanavigation/src/org/netbeans/modules/javanavigation/JUtils.java;
new revision: 1.7; previous revision: 1.6

navigator/javanavigation/src/org/netbeans/modules/javanavigation/MemberFilterModel.java;
new revision: 1.4; previous revision: 1.3

navigator/javanavigation/src/org/netbeans/modules/javanavigation/layer.xml;
new revision: 1.2; previous revision: 1.1

navigator/src/org/netbeans/modules/navigator/Navigator.java;
new revision: 1.6; previous revision: 1.5

navigator/src/org/netbeans/modules/navigator/NavigatorJList.java;
new revision: 1.4; previous revision: 1.3

navigator/src/org/netbeans/modules/navigator/SearchPanel.java;
new revision: 1.2; previous revision: 1.1

navigator/src/org/netbeans/modules/navigator/spi/ListModelSupport.java;
new revision: 1.4; previous revision: 1.3
Comment 3 David Simonek 2004-12-22 19:40:30 UTC
Switching in editor tabs is totally OK IMO now. Exploring in explorer
is still a little bit slower, but improved significantly.

Pls let me know if new performance is good enough or even more work is
needed. Parsing won't be any faster, but I can play some old tricks
like delaying and coalescing of activated node change reactions.
Comment 4 Antonin Nebuzelsky 2004-12-23 11:00:32 UTC
Yes, the behavior in both editor tabs and in Explorer is much better.

However, it is still quite easy to overload it, when you start quickly
switching tabs in editor or when you press and hold an arrow key in
Explorer.

The delaying and coalescing of activated node change reactions you
mentioned is exactly what might help in this case. Please, go ahead,
and do it.
Comment 5 Antonin Nebuzelsky 2005-01-11 13:43:44 UTC
Dafe, any plans to do the delaying and coalescing of activated node
change reactions soon? THX.
Comment 6 David Simonek 2005-01-11 15:25:18 UTC
Definitely I'll look at it before high resistance. Exact date uknown
so far.
Comment 7 David Simonek 2005-02-10 11:50:05 UTC
Fixed in main trunk, delay set to 100ms, node requests are properly
coalesced if coming frequently. Explorer use case is fine, quick tab
switching can still overload the system, but it's because of editor
slowness, not navigator anymore.

/cvs/objectbrowser/navigator/src/org/netbeans/modules/navigator/Navigator.java,v
 <--  Navigator.java
new revision: 1.23; previous revision: 1.22
Comment 8 Antonin Nebuzelsky 2005-02-10 15:37:13 UTC
Looks good.