JDK-5107263 : Worse performance of isSupported for JISAutoDetect (1.4.X)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 1.4.2_05
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-09-27
  • Updated: 2010-02-17
  • Resolved: 2005-09-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_10 b02Fixed
Related Reports
Relates :  
Relates :  
Relates :  
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
24-02-2005