commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ismael Juma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-707) Add methods to avoid Sun JVM synchronisation overhead in new String(byte[] b, String enc)
Date Tue, 19 Jul 2011 15:56:58 GMT

    [ https://issues.apache.org/jira/browse/LANG-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067799#comment-13067799
] 

Ismael Juma commented on LANG-707:
----------------------------------

Note that there have been changes in this area in Java 7:

"Using Charset as the parameter does not bring you any performance benefit (in fact it's slower
and bloat) in most use scenarios, use it with caution."
http://blogs.oracle.com/xuemingshen/entry/faster_new_string_bytes_cs

The blog above talks about single-byte encodings, but there has been a follow-up commit for
UTF-8 earlier this year.

> Add methods to avoid Sun JVM synchronisation overhead in new String(byte[] b, String
enc)
> -----------------------------------------------------------------------------------------
>
>                 Key: LANG-707
>                 URL: https://issues.apache.org/jira/browse/LANG-707
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: General
>         Environment: https://issues.apache.org/bugzilla/show_bug.cgi?id=51400
>            Reporter: Sebb
>             Fix For: 3.x
>
>
> According to Tomcat bug 51400, the use of new String(byte[] b, String enc) can fall foul
of a Sun Java synchronisation bottleneck.
> Might be useful to add the code workround to Commons Lang.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message