use stringbuilder for better multicore performance of formatter 

String buffer internally uses locking, which will reduce the performance on machines with multiple cores.