United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6271513 (tz) TimeZone.getDisplayName should use ConcurrentMap for caching display names
6271513 : (tz) TimeZone.getDisplayName should use ConcurrentMap for caching display names

Details
Type:
Bug
Submit Date:
2005-05-17
Status:
Resolved
Updated Date:
2010-07-29
Project Name:
JDK
Resolved Date:
2005-11-21
Component:
core-libs
OS:
generic
Sub-Component:
java.util:i18n
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2,5.0
Fixed Versions:
6

Related Reports
Backport:
Relates:

Sub Tasks

Description
Date.toString was improved by eliminating static GregorianCalendar and SimpleDateFormat instances. However, it calls TimeZone.getDisplayName to get an abbreviation of a time zone. In the getDisplayName implementation, it uses a HashMap with synchronization. The HashMap should be replaced with a ConcurrentHashMap to improve concurrency.
###@###.### 2005-05-17 10:37:45 GMT

                                    

Comments
EVALUATION

The following is the improvement on SunFire V65x (2 3.06GHz CPUs). The number of iterations of a Date.toString() call in 30 seconds.

# of threads   mustang b58   mustang b58 w/ fix
1                21464802       24408590
2                30374027       42014127
                                     
2005-11-01
EVALUATION

Use of ConcurrentHashMap should improve the concurrency.
                                     
2005-08-08



Hardware and Software, Engineered to Work Together