wicket-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn Dashorst" <martijn.dasho...@gmail.com>
Subject Re: Re: Re: LoadableDetachableModel: remove boolean attached
Date Thu, 02 Nov 2006 12:11:02 GMT
BTW, this is our own subclass for LDM. The reported size of 32/24 is
for a pure LDM of course different (and not measured here).

Martijn

On 11/2/06, Martijn Dashorst <martijn.dashorst@gmail.com> wrote:
> Exact same scenario followed for these two sessions:
>
> with boolean (current Wicket LDM):
>
> 330661 object live, shallow size 18,025,792, retained: 18,025,792
> 51 LDM instances, shallow size 1624, retained: 1,704
>
> without boolean (custom LDM):
> 330438 objects live, shallow size 17,790,424, retained 17,790,424
> 51 LDM instances, shallow size 1,224, retained 1,304
>
> The shallow size of a LDM instance went from 32 bytes to 24 bytes.
>
> I think this is worth the change.
>
> Martijn
>
> On 11/1/06, Igor Vaynberg <igor.vaynberg@gmail.com> wrote:
> > +1
> >
> > tell us how it profiles w/out the boolean
> >
> > -igor
> >
> >
> > On 11/1/06, Martijn Dashorst <martijn.dashorst@gmail.com> 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>
> > >
> >
> >
>
>
> --
> <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>
>


-- 
<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>

Mime
View raw message