[ 
https://issues.apache.org/jira/browse/WICKET-2525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766109#action_12766109
 ] 

Martijn Dashorst commented on WICKET-2525:
------------------------------------------

I'd just keep the format string as a property and recreate the SDF on request. 
They aren't that heavy to create and the JVM is good at discarding light weight 
garbage.

> DatePicker consume too much memory
> ----------------------------------
>
>                 Key: WICKET-2525
>                 URL: https://issues.apache.org/jira/browse/WICKET-2525
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-datetime
>    Affects Versions: 1.4-RC3, 1.4-RC4, 1.4-RC5, 1.4-RC6, 1.4-RC7, 1.4.0, 
> 1.4.1, 1.4.2
>            Reporter: Michael Mikhulya
>
> After changes related to WICKET-1988 DatePicker has two SimpleDateFormat 
> instance members, which were static members before.
> As result of it memory consumption has increased seriously. In my application 
> DatePicker consumes 10% of total memory.
> Also this change is not good for serialization since SimpleDateFormat 
> internally has a reference to GregorianCalendar which is rather heavy. 
> I think the easiest way to fix both issues (WICKET-1988 and this one) is to 
> use date formatter from joda-time. It is thread-safe and so can be declared 
> as static member.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to