[jdom-interest] XMLOutputter patch

Alex Rosen arosen at silverstream.com
Sat Nov 24 18:53:25 PST 2001


I did a little profiling today. Using Dennis' benchmark, I was able to speed
up XMLOutputter by 20% by using a BufferedWriter. Yes, you have to buffer
both the writer and the stream for the best performance.

I got another 15-20% speedup by optimizing escapeAttributeEntities() and
escapeElementEntities() for the common case where no escaping is actually
necessary. When it is necessary, the new code should be about as fast, I
think.

Alex Rosen
SilverStream Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XMLOutputter.java.diff
Type: application/octet-stream
Size: 6658 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20011124/584d363f/XMLOutputter.java.obj


More information about the jdom-interest mailing list