Bug #61105 | Avoid Java bottleneck by using explicit Charset for byte[]<->String conversions | ||
---|---|---|---|
Submitted: | 9 May 2011 19:55 | Modified: | 25 Jun 2013 21:38 |
Reporter: | David Engberg | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.16 | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[9 May 2011 19:55]
David Engberg
[11 May 2011 9:20]
Tonci Grgin
Hello David and thank for an excellent report! Probably the most interesting one I had in a long time. We discussed this yesterday and the ruling is to start working on implementation as soon as possible.
[22 Jun 2011 14:58]
Christopher Schultz
Tonci, Over in Apache Tomcat, we implemented a strategy similar to that proposed here: http://halfbottle.blogspot.com/2009/07/charset-continued-i-wrote-about.html The advantage to this solution is that it does not depend on methods only available in Java 1.6... only NIO support. Have a look at https://issues.apache.org/bugzilla/show_bug.cgi?id=51400#c5 for the patch we have for Tomcat where, hidden in there, is the use of Charset.decode(ByteBuffer.wrap(...)).
[22 Jun 2011 15:29]
Mark Matthews
Christopher, see http://bazaar.launchpad.net/~mark-mysql/connectorj/5.1/revision/1063 (we came to the same approach). Thanks for the pointer to your fix though!