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.
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.
"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.
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
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.
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.
Dafe, any plans to do the delaying and coalescing of activated node change reactions soon? THX.
Definitely I'll look at it before high resistance. Exact date uknown so far.
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
Looks good.