>>The general rule of thumb is that when loaded into memory, a DOM
>>representation takes around 5 times the size of the input document.

This depends on details of the implementation, and on the language you're
working in. Java's objects are particularly inefficient; last I checked,
they burned about 28 bytes before you put any application fields into
them...

>Just curious, but what is the ratio for DTM? Is it significantly smaller?

I don't have a current measurement, but DTM's main reason for being is to
reduce that 28-byte-per-node overhead by getting away from the usual naive
object-per-node implementation of the DOM. (DTM is also better "impedence
matched" to the needs of XPath and XSLT, which improves efficiency in other
ways.)

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

Reply via email to