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 Laurent Michenaud <lm...@adeuza.fr> on 2003/12/02 15:49:51 UTC

Memory Consumption

Hi,
 
How can i reduce memory consomption when executing xslt transformation ?
 
I've used a profiler to see to the memory needs.
 
The xml document is about 750Ko and it takes about 40Mo in the JVM.
 
We use a personnel library that encapsulates jdom.

Re: Memory Consumption

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



Xalan does not have native support for JDOM. To style from a JDOM the
document has to be recopied through SAX into our internal DTM model (or
from JDOM into a DOM which can then be wrappered by our DOM2DTM adapter
layer).

If you start with a DOM rather than a JDOM, you should avoid at least some
of the memory overhead. If you can start with a SAX stream you should avoid
more.

If/when we get XDM in place as our universal data-model API, someone may
write an XDM layer for JDOM and that ought to be at least semi-efficient.
(Comparable to running XDM over DOM, which should be much better than
running DTM over DOM). But don't hold your breath; XDM is still under
development and unstable (which is why I'm still pounding on a private
copy; it ain't ready for prime time), and JDOM support is just about dead
last on my own list of priorities (though I wouldn't object if someone else
tackled it).

______________________________________
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