https://issues.apache.org/bugzilla/show_bug.cgi?id=52579
--- Comment #7 from Keiichi Fujino <kfuj...@apache.org> 2012-02-06 08:20:18 UTC --- Created attachment 28274 --> https://issues.apache.org/bugzilla/attachment.cgi?id=28274 patch v2 Many thanks for the comments. I reimplement ByteChunk.toStringInternal(). > I suggest to replace that code by "cr.throwException();". The code was replaced by result.throwException(). CharacterCodingException is thrown as RuntimeException. > Charset.decode() uses a ThreadLocal-based cache of decoders. Maybe we can > implement something like that cache, or just use a simple ThreadLocal (or > other > way) to pass a Decoder instance around while processing the same request. Cache of Decoder was created using simple ThreadLocal. This cache is very simple now. Only one Decoder instance is always cached. If you would like to cache two or more Decoder instances, it is necessary to refactor. In that case, a code will become complicated to a slight degree. > 3) For large input data the current implementation that calls Charset.decode() > is better than the proposed one, because it allocates less memory. The > difference is between (size * averageCharsPerByte()) and (size * > maxCharsPerByte()). > > I think threshold can be around 10 bytes. The threshold value was added. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- 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