JDK-6304305 : performance: regression: parsing time zone fields is slow in SimpleDateFormat
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-08-01
  • Updated: 2013-11-01
  • Resolved: 2005-08-15
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.
JDK 6
6 b48Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
There appears to be a performance regression problem with the 6271375, 6274985, and 6276059 fixes. DateFormat test test/java/text/Format/DateFormat/Bug4322313.java takes 41 seconds on SunFire v65z. It should take only 0.5 seconds.

DateFormatSymbols.getZoneStrings() is very expensive because it has to duplicate a String[][].

Comments
EVALUATION Changes to the RFE 4052440 (Pluggable locales support) introduced this regression. Before that, SimpleDateFormat accessed 'DateFormatSymbols.zoneStrings' field directly, but after the RFE, it's been accessed through the public DateFormatSymbols.getZoneStrings() API, which always creates a defensive copy. Changed not to create the copy when zoneStrings is just read.
05-08-2005