On Mar 12, 2007, at 16:52, Thomas Yip wrote:

1> StringReader xmlStream = new StringReader(xmlWriter.toString());
2> Source src = new StreamSource(xmlStream);
3> Result res = new SAXResult(fop.getDefaultHandler());
4> transformer.transform(src, res);

However line#4 seems to be taking a lot of time to execute (around 40
seconds).

If I judge correctly, then what's causing the slowdown might just be line #1, but it's only when the transform is initiated that it becomes apparent this is a Bad idea...

Where does the xmlWriter come from? What is its type? Try to find a more efficient way than first converting it in into a String and wrapping a StringReader around it.


Cheers,

Andreas


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

Reply via email to