Subject: [xsl] Performance issue XSL:FO From: "Lee, Insoo" <Insoo.Lee@xxxxxx> Date: Mon, 23 Dec 2002 09:41:30 -0500 |
Hello, not sure if this question is appropriate for this newsgroup, but could somebody help please? I'm generating XML on the fly from my servlet (line# 9 - using jdom, reading from database) and after reading static XSL (line#7), I use transformer to do XSL:FO translation (line#21). However line#21 seems to be taking awfully long.... about 5 minutes for 1500 rows of records... Is there anyway to improve the performance? Thanks for your input in advance p.s) if there is other newsgroup where this type of question should go, please let me know. Thanks 1) if( "pdf".equals( contentType )) 2) { 3) Driver driver = new Driver(); 4) driver.setOutputStream(response.getOutputStream()); 5) driver.setRenderer(Driver.RENDER_PDF); 6) Transformer transformer=TransformerFactory.newInstance() 7) .newTransformer(new StreamSource( "http://myserver.com:8881/fd/xml/rates_pdf.xsl" )); 8) 9) URL url = new URL( "http://myserver.com:8881/sp/xmlBuilder" ); 10) 11) InputSource source = new InputSource( url.openStream()); 12) DOMParser parser = new DOMParser(); 13) parser.parse( source ); 14) Document doc = parser.getDocument(); 15) DOMSource inXML = new DOMSource( doc ); 16) 17) 18) System.out.println( "*************************** start timing.... for XML-XSL:FO translation" ); 19) long t1 = System.currentTimeMillis(); 20) 21) transformer.transform( inXML, new SAXResult( driver.getContentHandler())); 22) 23) long t2 = System.currentTimeMillis(); 24) System.out.println( "*************************** time delta for XML-XSL:FO translation: " + ( t2 - t1 ) + " ms" ); 25) } XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Adding <!DOCTYPE...>, Talwalkar (EXT), Sau | Thread | Re: [xsl] Performance issue XSL:FO, Oleg Tkachenko |
RE: [xsl] Adding <!DOCTYPE...>, Talwalkar (EXT), Sau | Date | [xsl] Adding namespaces to output, hauser felix |
Month |