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 67986 - Slow XML navigator rendering
Summary: Slow XML navigator rendering
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2005-11-02 14:49 UTC by _ rkubacki
Modified: 2006-03-06 12:35 UTC (History)
1 user (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 _ rkubacki 2005-11-02 14:49:23 UTC
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.
Comment 1 Marek Fukala 2005-11-02 17:34:54 UTC
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
Comment 2 Jiri Kovalsky 2006-03-06 12:35:28 UTC
Works fast in FCS build #200601251500 of NetBeans 5.0.