So I've been travelling a bit. San Francisco last week and this week in Denver. Getting a tour of various hotels and airlines.

So, in pre jdk1.5 the StringBuffer class is one of the most widely used classes. Especially in Servlets and JSPs, this class is used everywhere. The problem is that it is thread-safe. This might be good for some people, but it is terrible for web performance. With Request/Response, buffers are never shared between threads so all that synchronization is wasted.

I looked around and couldn't find any open source non-synchronized StringBuffers and my projects can't run on jdk1.5 yet (to take advantage of FastStringBuilder) so I had to write a new non-thread safe/non-synchronized FastStringBuffer class. I also wrote a new FastStringWriter class to replace that uses FastStringBuffer instead of StringBuffer.

So anyway, I need to clean up the class and submit it to jakarta commons lang or something. But it is a decent performance boost (about 50-200ms per page) that may help out your project.