On Mar 1, 2006, at 08:46, [EMAIL PROTECTED] wrote:

You changed the Writer.write to StringBuffer operations. I'd say that appending to a StringBuffer is much slower than writing directly to a BufferedOutputStream. There was a comparison between static concatenation, concatenation of Strings (variables) during runtime and appending characters to a StringBuffer. I don't remember the factor, but it was significant. Afterall RTF-export is not time critic and runs smooth and maybe the usage of StringBuffer.append is encouraged (due to incredible speed up in newer SDKs...whatever)...any comments?

Really? Well, I have to admit, this was a late-night idea :-/

Maybe we could make sure the Writer is wrapped into a BufferedWriter when creating it in RTFHandler, just to streamline a bit.

I'd drop that static Map anyways. Makes sense if you need the same constant in a hundred different places, but since all remains private to that tiny class here, they could as well be hardcoded. Work directly on the char primitive instead of the Character object as much as possible. (?)



Reply via email to