[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3284) TimeZoneType takes too much space in 2nd level cache
Yossi Tamari (JIRA)
noreply at atlassian.com
Wed May 14 12:59:33 EDT 2008
TimeZoneType takes too much space in 2nd level cache
----------------------------------------------------
Key: HHH-3284
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3284
Project: Hibernate3
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.2.6
Reporter: Yossi Tamari
Priority: Minor
TimeZoneType does not override the assemble/disassemble methods, and as a result the whole sun.util.calendar.ZoneInfo object is stored in the second level cache, and if using a distributed copying cache, the whole structure is serialized and sent across the network. This is very inefficient since the ZoneInfo contains a number of arrays, and for some timezones (like europe/london) some of the arrays (specifically transitions, an array of long) have over a hundred elements.
Considering that the objects are stored in the DB as string IDs, simply overiding disassemble to return this string, and overinding assemble to return TimeZone.getTimeZone(value) would achieve huge memory (and potentialy network) savings, at the cost of object creation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list