out of curiousity, how many times did you run the test?

doing transaform inside Tomcat will be slow the first couple of times.
what I've done in the past is run it for a couple hundred times, then
take the measurement for real.

peter


On Mon, 13 Sep 2004 07:02:06 -0700 (PDT), Michal Sg <[EMAIL PROTECTED]> wrote:
> Hi,
> The timing I gave is only for the transform call (I'ts for some specific input 
> files, for other files it takes faster. But still, the difference is huge when it's 
> run from a standalone process).
> 
> The Xalan jar is under <apache dir>\common\lib .
> 
> Regarding the Tomcat version - I know it's old, but it doesn't solve my problem 
> since this is the version I have to make it work on...
> It works a little faster on Tomcat 5 , but I need a solution for Tomcat 4.0.3 .
> 
> Thanks !
> 
> 
> 
> "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> Are you timing just the transform call or all four calls (the
> transformer creation, stream result creation, setSystemId, and
> transform)?
> 
> Where did you put the Xalan 2.6.0 jar in Tomcat?
> 
> If you're just timing the transform call, I'm not sure I buy your
> benchmark.
> 
> BTW, you're using an ancient Tomcat version. You may wish to upgrade.
> 
> Yoav Shapira
> Millennium Research Informatics
> 
> >-----Original Message-----
> >From: Michal Sg [mailto:[EMAIL PROTECTED]
> >Sent: Monday, September 13, 2004 9:51 AM
> >To: [EMAIL PROTECTED]
> >Subject: xalan's Transformer performance in Tomcat
> >
> >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?
> >
> >Thanks,
> >Michal.
> >
> >
> >
> >---------------------------------
> >Do you Yahoo!?
> >Read only the mail you want - Yahoo! Mail SpamGuard.
> 
> This e-mail, including any attachments, is a confidential business communication, 
> and may contain information that is confidential, proprietary and/or privileged. 
> This e-mail is intended only for the individual(s) to whom it is addressed, and may 
> not be saved, copied, printed, disclosed or used by anyone else. If you are not 
> the(an) intended recipient, please immediately delete this e-mail from your computer 
> system and notify the sender. Thank you.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>                
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
>

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

Reply via email to