LGTM.
BTW: if you want to go the extra mile, you can get even more speed up by reusing the StringBuilder. Call setLength(0) to "start fresh", but it retains the internal char buffer so you can avoid tons of allocations. You could probably either pass a reusable buffer through as a param, or keep an instance var if you're careful about it. There's a similar trick to avoid the implicit allocation in "pw.print(sb.toString());". You use your own reusable char[] to transfer the data. For an example, see: http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/src/com/google/gwt/core/linker/SymbolMapsLinker.java#112 May not be worth it since this is only for -soyc compiles; I did it for SymbolMapsLinker because that runs during every compile. http://gwt-code-reviews.appspot.com/34815/diff/1/2 File dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java (right): http://gwt-code-reviews.appspot.com/34815/diff/1/2#newcode74 Line 74: //private HtmlTextOutput htmlOut; Might as well delete rather than just comment out. http://gwt-code-reviews.appspot.com/34815 --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
