JDK-7133138 : Improve io performance around timezone lookups
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 6u30
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-01-25
  • Updated: 2014-11-19
  • Resolved: 2012-03-06
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 JDK 7 JDK 8
6u31-revFixed 7u6Fixed 8 b29Fixed
Description
SHORT SUMMARY: Improve getTimeZone performance
INDICATORS: Slow IO possible on some windows boxes while indexing through and 
creating
a Map of all available TimeZones in JRE.
COUNTER INDICATORS:
TRIGGERS: 
JDeveloper team have reported a temporary GUI hang while dispatching a 
TimeZone intensive IO operation
on their awt event dispatch thread. Suggested they don't perform IO on EDT 
but not accepted.
KNOWN WORKAROUND: Never put intensive IO operation on EDT
PRESENT SINCE: N/A
HOW TO VERIFY: JDeveloper team are happy with recent proposed changes.
In local tests, I've see time for testcase (available in bugDB 13511596) fall 
from ~4 seconds to 3 seconds on windows box
NOTES FOR SE: Request to port to 6uX and later releases.
Changes involve reducing the number of file stats performed on files in 
jre/zi directory and add an alias look-up table to avoid reading TZ aliases 
where possible.
REGRESSION: No.

Comments
Compared performance between 8b28 and 8b29.
10-01-2014

Verification Procedure. Compile and run TZ.java test program attached in bugdb_13511596 on both 8b28 and 8b29 (integrated the fix). Test Result 8b28: average time is 224ms 8b29: average time is 134ms Test Env. Windows 2008R2 (Intel Xeon CPU E5-2690 @ 2.90GHz)
10-01-2014

EVALUATION Optimise the zoneinfo lookup code by reducing number of file stats for jre/lib/zi/* files and by creating a aliastable which eliminates alias-to-alias mappings.
24-02-2012