United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5107263 : Worse performance of isSupported for JISAutoDetect (1.4.X)

Details
Type:
Bug
Submit Date:
2004-09-27
Status:
Closed
Updated Date:
2010-02-17
Project Name:
JDK
Resolved Date:
2005-09-02
Component:
core-libs
OS:
windows_xp
Sub-Component:
java.nio.charsets
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2_05
Fixed Versions:
1.4.2_10 (b02)

Related Reports
Relates:
Relates:
Relates:

Sub Tasks

Description
We have found worse performance of isSupported with "JISAutoDetect".

REPRODUCE :
   1) Compile the attached test program
   2) Launch "java isSupportedTest1"
   
  We can see the result of execution(elapse) time as follows.

  case5:24626
  case6:24545

  This is done in 1.4.2_05.

CONFIGURATION :
   OS : Windows XP (SP, Japanese)
   JRE : 1.4.2_05
   Mem: 384 [MB]
   MPU : Pentium IV 1.4[GHz]

==========================================================================

                                    

Comments
EVALUATION



JISAutoDetect is not a supported charset in 1.4.2, whereas in 1.5 it is. If I modify the testcase and use an unsupported charset and run with 1.5, then it takes a longer time in 1.5 also. 

So the behavior is same in both 1.4.2 & 1.5 with respect to unsupported charsets. 

To avoid this performance bottleneck, we will have to backport support for JISAutoDetect. I will have to check if we can backport this.
###@###.### 2005-2-24 11:43:37 GMT

As per the documentation JISAutoDetect is part of Extended Encoding Set, which is supported only by java.io and java.lang APIs and not by java.nio APIs.
See http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html

Which means, JISAutoDetect is a valid encoding supported by Java but can not be
accessed via the NIO API which the test case does.

It can be closed as not a bug.

###@###.### 2005-04-18 12:37:34 GMT
                                     
2005-02-24



Hardware and Software, Engineered to Work Together