United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7133138 : Improve io performance around timezone lookups

Details
Type:
Bug
Submit Date:
2012-01-25
Status:
Closed
Updated Date:
2014-11-19
Project Name:
JDK
Resolved Date:
2012-03-06
Component:
core-libs
OS:
generic
Sub-Component:
java.util:i18n
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u30
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

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.  
                                     
2014-01-10
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)

                                     
2014-01-10
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.
                                     
2012-02-24



Hardware and Software, Engineered to Work Together