You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Mike Foley <mf...@silverstream.com> on 2000/02/25 18:47:56 UTC
Memory Usage of XSLT processor
Hello,
I am trying to get a handle on how much memory the XSLT processor uses
in the VM when I use it as I've described below. I'm using a heap tool
and I see the number of bytes used by the following classes as I've
described below. There are a total of 80 classes, these are the top 6
by bytes used in the vm, and represent over 90% of the total bytes, so
I'm omitting the other classes.
org.apache.xalan.xpath.dtm.DTMProxy[] 4100
org.apache.xalan.xslt.ElemTextLiteral 884
org.apache.xalan.xslt.ElemLiteralResult 1860
org.apache.xalan.xslt.AVT 1120
org.apache.xalan.xpath.DTMXPath 864
org.apache.xalan.xpath.DTMProxy[] 4100
----------
12928 bytes, approx 1.3K
So my question is: is it a resasonable assumption for me to make that
the code below uses about 1.3K of memory?
The reason I'm asking is that I'm going to be potentially executing the
block of code below by maybe 1000 different threads, and am trying to
get a handle on the memory requirement. 1.3K * 1000 = 1.3MB. yes?
Thanks in advance for any advice, confirmation, flames....
Mike
This is the code being executed:
// Transform the layou XML & XSL to HTML using the XSLT Processor
org.apache.xalan.xslt.XSLTProcessor processor =
org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor();
org.apache.xalan.xslt.XSLTInputSource xmlSource =
new org.apache.xalan.xslt.XSLTInputSource(new
java.io.ByteArrayInputStream(xmlBuffer.toString().getBytes()));
org.apache.xalan.xslt.XSLTInputSource xslSheet =
new org.apache.xalan.xslt.XSLTInputSource(new
java.io.ByteArrayInputStream(xslBuffer.toString().getBytes()));
org.apache.xalan.xslt.XSLTResultTarget xmlResult = new
org.apache.xalan.xslt.XSLTResultTarget(byteOut);
processor.process(xmlSource, xslSheet, xmlResult);