You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Foxy Shadis <fo...@hotmail.com> on 2003/07/15 08:47:35 UTC

Re: [OT] FW: I'm getting java.lang.OutOfMemoryError when my XML ...

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

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

Swiftpaw Foxyshadis, wildlife artist
foxyshadis@hotmail.com | http://foxyshadis.dyndns.org/
http://foxyshadis.dyndns.org/journal/foxyshadis

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


Re: [OT] FW: I'm getting java.lang.OutOfMemoryError when my XML ...

Posted by Joseph Kesselman <ke...@us.ibm.com>.



>>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