Tomcat has introduced several class loaders, and another version of xalan.
Things you can do (these were for 2.3.1):

1) Make sure you have 1 and only 1 xalan.

2) Moved to the nightly buid. Based on a suggestion by Scott Boag I moved to
the nightly build. I saw much better memory usage and could much more easily
move to XSLTc from Xalan. SInce you have 2.4, may 

3) Mave use of the java extension namespace. Some common number, currency,
data formatting was very specific to my application. I found that writing a
java class and calling the extensions using java:myClass sped up the basic
formatting as I do not require the general cases which XSL provided.
However, this seems to make moving to XSLTc a bit harder.

4) Made use of the select attribute of <xsl:variable> instead of a nested
<xsl:value-of>. This was well documented, and saved me a clone each time I
looked up global variables. Since I was using them as global strings and
numbers, this was a good gain.

5) Set the following system properties:

"org.apache.xml.dtm.DTMManager","org.apache.xml.dtm.ref.DTMManagerDefault"
"org.apache.xerces.xni.parser.XMLParserConfiguration","org.apache.xerces.par
sers.StandardParserConfiguration"

-- bk

> -----Original Message-----
> From: Mario Felarca [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 16, 2002 5:47 PM
> To: [EMAIL PROTECTED]
> Subject: Performance within Tomcat issue
> 
> 
> Hello,
> 
> I have a quick question and I was looking for any insights or 
> ideas to try. 
> I am running Tomcat 3.3.1 with the JRE 1.3.1_03 server vm, 
> and Xalan-J 2.4D1.
> 
> I wrote a small test program that performs a couple of 
> transforms on some 
> data that I have that happens to be a decent size. This 
> transforms it in 
> about 40 seconds each for the first pass, and usually 16 and 
> 26 seconds 
> each for the subsequent iterations.
> 
> When I am run the same two transforms from within a servlet 
> running under 
> Tomcat, it takes an unbelievably long time. We are talking on 
> the order of 
> 6-8 min. for the first transform, and 2-3 min for the second one.
> 
> For further clarification, the transformers are always derived from a 
> Templates object. The system is a P3-800 with 256 MB of 
> memory. When I run 
> my test program, it sucks nerely 100% CPU for the whole time, 
> and chews a 
> healthy amount of memory. When I run from tomcat, it spikes 
> the CPU to 
> varying levels but never chews it consistently, while at the 
> same time 
> consuming apparently a bit less memory (or quickly gc'ing the memory).
> 
> In both cases, the Java heap is set to minimum 128 and maximum 512.
> 
> I would expect the time under the servlet to be a bit slower, 
> primarily 
> because there are other things that I am doing there that I 
> am not doing in 
> my test program, but these numbers are downright painful.
> 
> Any experiences with similar situations, ideas, thoughts, or 
> pointers would 
> be greatly appreciated!
> 
> Thanks in advance,
> 
> Mario-
> 

Reply via email to