I'm not sure what question you're asking.

If you want to break DOM2DTM out of Xalan and reuse it in another
application... I don't think you're going to get any performance gain that
way. DOM2DTM, since it runs as a wrapper around the DOM, is probably a bit
slower than native DOM coding and certainly consumes additional memory. If
you're interested in experimenting DTM for performance reasons, I would
recommend that you look at the "native" DTM implementation, SAX2DTM.

Note that DTM's data model is tailored for the needs of Xalan, and has
costs as well as benefits. It's a read-mostly structure (the only write
capability provided is via its construction mechanism), so it's less
flexible than the DOM is. It has some explicit size limits, due to the way
nodes are addressed. And it is harder to debug DTM-based code than
DOM-based code, since the data for a node is distributed and few debuggers
are good at helping us examine it.

Note too that if performance is critical, the right answer may be to do
exactly what we did with DTM -- create your own specialized data
structures, tailored very directly for the needs of your own application.

Reply via email to