Yeah, well. sounds good but what would happen if the object gets
deserialized? The field where value is stored is transient. So you would
have to implement readObject too, to set the default value, right?
-Matej
Johan Compagner wrote:
we could do it a bit different, Have a private static final String
NOT_ATTACHED = "notattached";
then store that value in the object....
johan
On 11/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
+1
tell us how it profiles w/out the boolean
-igor
On 11/1/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
>
> All,
>
> While profiling we see that the LoadableDetachableModel uses some
> memory. Currently the LDM keeps track of whether it is attached in a
> transient boolean.
>
> If we change the semantics that a null tempModelObject == detached,
> and a non-null tempModelObject == attached, we can remove the boolean
> and reduce the footprint of the LDM.
>
> BTW, the LDM is one of the most commonly used models in our app
> (37000+ instances in a 60 user session, giving a shallow size of 2.1MB
> and a retained size of 2.9MB).
>
> Any objections or thoughts?
>
> Martijn
>
> --
> <a
href="http://www.thebeststuffintheworld.com/vote_for/wicket">Vote</a>
> for <a href="http://www.thebeststuffintheworld.com/stuff/wicket
> ">Wicket</a>
> at the <a href="http://www.thebeststuffintheworld.com/">Best Stuff in
> the World!</a>
>