Enhancing Performance with LazyDOM

DOM programming is often criticized for its relatively poor performance and large memory footprint when compared to embedded template JSP programming. Representing the entire document as a fully accessible tree has programming advantages, but also introduces potentially significant overhead as a consequence.

By default, the Xerces-generated DOM expands each node when it is loaded into memory. These nodes represent costly events, particularly if only small portions of the template are to be updated dynamically. The instantiation of nodes in static locations of the DOM makes little sense. But, it's understandable why the DOM was implemented with this behavior, because the DOM itself would not know which portions ...

Get Enhydra XMLC™ Java™ Presentation Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.