[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: Saxon performance difference in eClipse and App Server
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 14 Dec 2010 13:09:43 +0000
>               /******* THIS IS WHERE MOST OF THE TIME TAKEN IS ********/
>               transformer.transform(new DOMSource(doc), new
> StreamResult(baos));

The usual advice to avoid DOMSource as that incurs a conversion cost
behind the scenes.

Instead, supply a StreamSource with either a StringReader (for a
String) or an InputStreamReader (for a ByteArrayInputStream).



--
Andrew Welch
http://andrewjwelch.com

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member