[squeak-dev] Shrinking

Eliot Miranda eliot.miranda at gmail.com
Tue Jan 7 02:15:31 UTC 2014


On Mon, Jan 6, 2014 at 4:35 PM, Colin Putney <colin at wiresong.com> wrote:

>
>
>
> On Mon, Jan 6, 2014 at 4:40 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
>
>
>> Before trying to shrink, check that there are _not_ the 8 Obsoletes I
>> talked about in
>> <94EA41C1-42EF-462E-8883-A8999AA7CB03 at gmx.de> (
>> http://forum.world.st/Obsoletes-tp4732904p4732931.html)
>>
>
> Aha!
>
> In the latest Trunk, there's only 6 obsolete classes, as the recent
> Environment changes fixed the two of them. The following script, adapted
> from your post above, cleans them up nicely:
>
> " Fix obsolete ColorTheme"
> ColorTheme current class isObsolete ifTrue: [
> ColorTheme current: nil.
> Smalltalk garbageCollect.
>  ColorTheme current].
>
> " Fix obsolete uncle classes (cls->meta->super)"
> (Smalltalk allClasses select: [:cls | cls theMetaClass superclass
> isObsolete]
> ) copy do: [:withObsoleteUncle | | cls2 |
> cls2 := withObsoleteUncle addInstVarName:
> 'veryUnlikelyToExisitAnywhereInTheSystemAsVariableName'.
>  Smalltalk garbageCollect.
> cls2 removeInstVarName:
> 'veryUnlikelyToExisitAnywhereInTheSystemAsVariableName'.].
> Smalltalk garbageCollect.
> Smalltalk fixObsoleteReferences.
>
>
>
> Running "Smalltalk shrink" then complains about two obsolete behaviours,
> and I this is a bug with Installer. If I just close the debugger and
> inspector, collect garbage and then run "SystemNavigation default
> obsoleteBehaviors" I get an empty array.
>
> So it looks like the shrink works. It doesn't do much, though. My image
> goes from 20.9MB, down to 20.3MB.
>

and (just to check) you've already done Smalltalk unloadReloadablePackages?
 I managed to get down to a 12 Mb minimal trunk but I had to hack fix a lot
of MNUs.  Basically we have work to do to make those packages really unload.


> Colin
>
-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140106/1dd9cbdd/attachment.htm


More information about the Squeak-dev mailing list