[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How to speed up parsing ??

Subject: RE: How to speed up parsing ??
From: "Tengshe, Ashish" <Tengshe.Ashish@xxxxxxxxxxxxx>
Date: Fri, 1 Aug 2003 11:13:09 -0500
domparser speed
OK, it seems like you are using Java right?
(java -ms25M -mx100M xslFileName xmlFileName > directingOutput.txt)

You can parse the document and create a Document object 
  
  DOMParser parser = new DOMParser();
  parser.parse("D:/foo.xml");
  /* You can parse a File or an InputSource, if you have InputStream then just do InputSource s = new InputSource(InputStream) thing. */
  Document document = parser.getDocument();

This Document object is parsed XML. You should store this in memory (Session/whatever else)if you repeatedly need it!

Also if you repeatedly need the same XSL file you should use some caching mechanism. 
Also, XSL files after parsing can be represented by Templates objects

TransformerFactory tFactory = TransformerFactory.newInstance();
Templates t = tFactory.newTemplates(xslSource);
Transformer transformer = t.newTransformer();

these Templates object can be stored in a HashTable in session or something and retrieved when this particular XSL is called again.
This will reduce time. If you need more info, please mail me directly at tengshe.ashish@xxxxxxxxxxxxx

Lastly, try Translets, I've had better results working with large documents (Refer to Mukul Gandhi's post XSLTC)
Thanks,
Ashish



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.