Of one who tried to strip the system

Dwight Hughes dwighth at ipa.net
Sun Nov 14 23:10:07 UTC 1999


Take a look at how it's done in SystemDictionary>>majorShrink. I don't
think it has been significantly updated for a couple of minor versions,
so no doubt there are needed additions to strip some of the newer system
categories, but it worked well for 2.5 (I think that is the last time I
tried it).

-- Dwight

Stefan Matthias Aust wrote:
> 
> I tried to strip an out-of-the-box Squeak 2.6 image (no patches yet) down
> to the essential classes using the "Smalltalk discard*" methods.  I chose
> to keep MVC and to discard morphic.  I also kept the VM generation stuff.
> It did a job job saving about 3MB of image size.
> 
> However, there're still quite a few classes left which are obviously
> unneeded once to got rid of 3d stuff and networking and so on.  So I tried
> to remove them, too.
> 
> First, I noticed, that without morphic, you cannot fileout anything
> anymore, because SystemDictionary>>version requires The EToySystem class.
> So I had to modify that method and hardcode the version.  Then I removed
> all classes which were IMHO unneded and had no references from other
> methods.  These changes result in a less than 2 MB image.
> 
> Unfortunately, I've now 163 obsolete classes in my system and 293 methods,
> which refer to these classes.  So stripping isn't that easy.
> 
> I think, I can safely remove support for flaps, scrabbook and some other
> morphic specific things, but I'd recommend that somebody who's involved
> more deeply in the system will check this. Actually, most problematic are
> #isKindOf: sends which always hard code class references.
> 
> Still, that doesn't help very much and I think, I give up that attempt.  If
> anybody is interested in continuing this, I've attached the changeset to
> add more discard methods.
> 
> At the moment, it seems near to impossible to cleanly discard morphic.
> Furthermore, as all menus and initialization methods are hard coded, these
> are also sources for other obsolete class references.
> 
> bye
> 
>   ------------------------------------------------------------------------
>                               Name: Discards.14Nov1042pm.cs
>    Discards.14Nov1042pm.cs    Type: Squeak (EditPlus) (application/x-unknown-content-type-EditPlus.7)
>                           Encoding: base64
> 
>   ------------------------------------------------------------------------
> 
> --
> Stefan Matthias Aust  //  Bevor wir fallen, fallen wir lieber auf.





More information about the Squeak-dev mailing list