This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XSL Transformation Speed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL Transformation Speed" Watch "XSL Transformation Speed" New topic
Author

XSL Transformation Speed

Paul Morano
Greenhorn

Joined: Jun 18, 2003
Posts: 7
Hello,
I am doing an XSL transformation from XML->XML and find it is very slow. Granted, I do have a very large <xsl:for-each> section that can produce varying sizes depending on the input XML.
Is there some way I can speed up XSL transformations? Maybe some guidelines to follow?
I have tried the following but with little speed improvements:
Using a Templates Object.
Limiting use of // (descendant axes)
Optimizing Variable Creation (e.g. <xsl:variable name="fooElem" select = "foo" />
Any suggestions are appreciated.
Thanks.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
Which toolkit are you using? I understand there are vast differences in speed for various types of problem. Here is a benchmark I found, rather out of date.
Bill


Java Resources at www.wbrogden.com
Tony Yan
Ranch Hand

Joined: Apr 10, 2002
Posts: 170
Can you post your xsl?
Another thing, if you have a lot of wild cards (*) or testing (test="a='xyz'"), things can be slowed down dramatically.


Tony Yan<br /> <br />IBM Certified Developer XML and Related Technology<br />Sun Certified Web Component Developer For J2EE Platform<br />Sun Certified Programmer For Java 2 Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSL Transformation Speed
 
Similar Threads
From Transformation perspective:Elements Vs Attributes
Layout framework design
easy way to view transformations
Displaying an image from xml source element
track progress of an xsl transformation?