You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Eelco Hillenius <ee...@gmail.com> on 2007/02/25 19:05:33 UTC

size of objects estimation for Wicket

Hi,

What do you think of this approach
http://www.javaspecialists.co.za/archive/Issue078.html to calculating
object sizes opposed to doing it using serialization like we do now?

Eelco

Re: size of objects estimation for Wicket

Posted by Eelco Hillenius <ee...@gmail.com>.
I just implemented a little pattern to delegate Objects.sizeOf to a
strategy. The idea behind that is that we could plugin Java 5 based
calculations with wicket 1.3 (which obviously only works when people
are on 1.5). For that, we could follow the approach as outlined here:
http://www.jroller.org/page/maxim?entry=again_about_determining_size_of

Any thoughts on how he does that?

Eelco


On 2/25/07, Eelco Hillenius <ee...@gmail.com> wrote:
> Hi,
>
> What do you think of this approach
> http://www.javaspecialists.co.za/archive/Issue078.html to calculating
> object sizes opposed to doing it using serialization like we do now?
>
> Eelco
>

Re: size of objects estimation for Wicket

Posted by Johan Compagner <jc...@gmail.com>.
Thats pretty much how serialization works now (with a byte counting
outputstream)
Except that serialization doesn't count transient fields (which ofcourse
also cost memory)
And you kill some overhead also by doing this.

johan


On 2/25/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> Hi,
>
> What do you think of this approach
> http://www.javaspecialists.co.za/archive/Issue078.html to calculating
> object sizes opposed to doing it using serialization like we do now?
>
> Eelco
>