bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/44052] New: Performance problems with date formatting


From: aimana at makonetworks dot com
Subject: [Bug classpath/44052] New: Performance problems with date formatting
Date: 10 May 2010 01:47:49 -0000

Hi there, I am not entirely sure if this is a bug, but it looks like it to me.

We are seeing very long load times (~900 ms) just to do a
java.util.Date.toString()

I have tracked this problem down to insufficient caching of timezone
information. The class where most time is spent is DateFormatSymbols.java. This
class reads the LocaleInformation properties files / resource bundle and parses
them to get the timezone information. The problem is that an instance of this
class is created every single time we format a date, or try to get timezone
info.

As a test, we cut down the en_us properties file to only have 1 zoneString
(UTC). This sped up all calls to 'new DateFormatSymbols();' from 900 ms to ~300
ms.

As a proposed fix I think Timezone information should be cached somewhere..
Either making DateFormatSymbols a singleton or having static references to an
instance in classes that use it, such as TimeZone.java


-- 
           Summary: Performance problems with date formatting
           Product: classpath
           Version: 0.98
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aimana at makonetworks dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44052





reply via email to

[Prev in Thread] Current Thread [Next in Thread]