https://issues.apache.org/bugzilla/show_bug.cgi?id=43925
--- Comment #12 from Issa Gorissen <flo...@usa.net> --- Brian, I've taken a look into the code you've submitted but I failed to understand how this code reduce the number of array copies in comparison with Tomcat's current implementation. I've ran the test cases with different values for the iteration and can't see real improvements. Calls to write(String) [1] will always induce a array copy, unfortunately, because they are immutable. Calls to write(char[]) [2] are not improvable because we don't know if the caller will reuse the char array - so we need to copy it. I don't know if calls to [1] are more frequent in a web app than calls to [2]. If it is the case, then trying to avoid the array copy from the String would be good overall. In fact, having to manage both char[] and Strings makes it harder to improve the whole class! So as it seems that reducing the number of array copies is difficult while calling write() (even doable ?), maybe improving the way the buffer grows is the way to go - reducing the number of array copies and garbage creation. Any comment on my reflections ? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org