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.
While profiling XML file opening (issue #65344) I find that navigator painting is very slow. There are various reasons - it contains JTree thatgeneraly is not the fastest component to paint. We can consider using large model with fixed row height if we are able to get painted data quickly - HTML rendering from Swing is used. We have simpler HTML rendering support in the IDE that can make it significantly faster - other inefficiences like NavigatorTreeCellRenderer.getTreeCellRendererComponent() calls super implementation and it calls setText() using TreeNodeAdapter.toString that creates non HTML representation of node and later we call setText to use HTML version.
fixed. 1) o.o.a.HtmlRenderer used to render the XML nodes. 2) the redundat calls to getText()/toString() eliminated 3) large model not used - it has no performance impact (I have tested and measured it). Really thanks for finding this. Now it is superb fast! I like performance team :-) Checking in xml/text-edit/src/org/netbeans/modules/xml/text/navigator/NavigatorContent.java; /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/navigator/NavigatorContent.java,v <-- NavigatorContent.java new revision: 1.16; previous revision: 1.15 done Checking in xml/text-edit/src/org/netbeans/modules/xml/text/navigator/NavigatorTreeCellRenderer.java; /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/navigator/NavigatorTreeCellRenderer.java,v <-- NavigatorTreeCellRenderer.java new revision: 1.7; previous revision: 1.6 done Checking in xml/text-edit/src/org/netbeans/modules/xml/text/navigator/TreeNodeAdapter.java; /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/navigator/TreeNodeAdapter.java,v <-- TreeNodeAdapter.java new revision: 1.11; previous revision: 1.10 done
Works fast in FCS build #200601251500 of NetBeans 5.0.