>XML Code Folding Performance Improvement

>Inspired by Jesper’s patch, I did a bit of work on the code folding for the XML editor. Bug 269600, helps with the XML code folding performance on large xml files. In the past, it could take several minutes for a large XML file with many sub nodes, to render in the editor. With the patch applied, this renders a 500K XML file in about 3 seconds with all folding enabled.

The bottle neck seemed to be the fact that the code was trying to add adaptor notifications even if the call to get nextSibling or nextChild returned Null. This patch adds a check first before adding adaptorNotifications to the nodes, to make sure that it isn’t null.

It’s one of the annoying things about the W3C DOM, too many items return nulls, and there has to be too many checks for Nulls.

This entry was posted in eclipse, xml. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s