Shrinking

Boris Gaertner Boris.Gaertner at gmx.net
Thu Aug 26 12:40:00 UTC 2004


From: "Pavel Krivanek" <squeak1 at continentalbrno.cz> wrote:


> I have modified shrinking process for image 3.0. I have prepared a patch
> which removes Morphic references from source codes.
>
> The result is cca 1.2 MB large compact image with Squeak kernel and basic
> MVC tools. It has NO OBSOLETE CLASSES!!!
I tried it (for 3.0) and I find it really beautiful. A really careful test
of the
shrunken image will require some time, but I will do it these days -
as soon as I can find some hours to play with the image.

<snip>
>
> Problems:
> - This image doesn't contain hundreds of useful methods
Yes, that is the price that we have to pay for shrinking. We can
use the  holdForShrink to preserve methods that we do not
want to loose. I find the holdForShrink protocol very beautiful.
(There is a differnt shrink script on the swiki which uses
a method in SystemDictionary to enumerate the names of all
messages that must not be deleted from the image, but the
class-wise holdForShrink is much more convenient to
maintain.)

> - Some removed messages have still record in class organization
Yes, the method
    SystemDictionary>>removeAllUnsentMessages
removes the messages with
    Behavior>>removeSelectorSimply:
a method that does not remove the method from the
class organizer.

Attached you find a change set that you should merge with
your file  MajorShrink.cs
It adds code to update the class organization
after shrinking. This removes the names of all removed
methods from the class organizers. This update is also
necessary when you want to do a
condenseSource: Source condensation will fail when
the class organizations are not fully in synch with the
class descriptions.

With that change set I was able to do a
    Smalltalk condenseSources



Greetings, Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OrganizerFix.4.cs
Type: application/octet-stream
Size: 8192 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040826/e3e96a10/OrganizerFix.4.obj


More information about the Squeak-dev mailing list