help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] the test test - a more detailed analysis of image c


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] the test test - a more detailed analysis of image contents
Date: Mon, 20 Jul 2009 21:34:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

A couple more data points to give Nicolas some work.

Let's get a random OC:

st> a := (OrderedCollection allInstances at: 14000)
OrderedCollection ()

and let's see where it comes from. Some objects fail to print because they point to files on Stefan's machine, so..

st> (b := a allOwners) collect: [ :e | e class ]
(Iliad.RawHtmlElement MethodContext CallinProcess Array Array Array Array Array Array MethodContext MethodContext Association MethodContext CallinProcess BlockClosure MethodContext MethodContext MethodContext )

st> b first inspect
An instance of Iliad.RawHtmlElement
  children: OrderedCollection ()
  attributes: Dictionary (
)
  contents: 'falsch'
a RawHtmlElement

Doh.  Here go ~400 bytes:

st> b first attributes basicSize
32
st> b first children basicSize
16

13 megabytes:

st> Iliad.RawHtmlElement allInstances count: [ :e | e children size = 0 & e attributes size = 0 ]
26945

plus 6 more for Iliad.BreakElement:

st> Iliad.Element allSubclasses asArray collect: [ :e | e->(e allInstances count: [ :e | e children size = 0 & e attributes size = 0 ]) ]
.... Iliad.BreakElement->16613 ....

Regarding children, there are 5166 InputElements and 16613 RadioButtonElement that would save 150 bytes each.

and so on.

I'll look at Accept later.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]