On Mon, 13 Sep 2004 06:51:17 -0700 (PDT), Michal Sg <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I use Tomcat 4.0.3 on win2k.
> I have the following code:
> 
> -----------------
> Transformer transformer = TransformerFactory.newInstance().newTemplates(new 
> StreamSource(xslFileName)).newTransformer();
> 
> StreamResult strResult = new StreamResult(new FileOutputStream(outHtmlFileName));   
> strResult.setSystemId(outHtmlFileName);
> 
> transformer.transform(new StreamSource(inXmlFileName), strResult);
> --------------------
> 
> When I run this code in a standalone Java process (from command line), I get a 
> result in 30 seconds, but when I run this code from a servlet within Tomcat, it 
> takes 6 (!!) minutes to run. The line of code that takes all this time is the last 
> one - transformer.transform...
> I use xalan & xerces 2.6.0
> 
> can anyone please help reduce this time?

There doesn't seem to be any servlet API objects involved in this, as
the transformation occurs from one file to another. So I don't know,
and you should use a profiler.

You should also be careful that inside Tomcat, you may not be using
the same XML parser and XSL transformer that you are using in your
standalone application.

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
R�my Maucherat
Developer & Consultant
JBoss Group (Europe) S�RL
xxxxxxxxxxxxxxxxxxxxxxxxx

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to