[modules] Refactoring and shrinking the image, was Re: [Squeakfoundation]What I would like to promote

Henrik Gedenryd h.gedenryd at open.ac.uk
Thu Jan 31 12:32:33 UTC 2002


Moving this to the main list...

Dan Ingalls wrote:

> ducasse <ducasse at iam.unibe.ch> wrote...
>> I think that Celeste is "well" separated from the core so this could be
>> interesting to try.
> 
> Hi Stef -
> 
> I've been reflecting more on this since responding to your message.  I
> completely defer to you and Henrik on which way to go, but I see a choice
> here:
> 
> Either we...
> Find various small things that are pretty modular and do them first
> 
> Or we...
> Take various big chunks that are pretty modular and do them first.
> 

I made some experiments with this, and as it turns out, the easiest part is
also the largest and most expendable one: VMConstruction. Storing it gives
you 2.8M of code on disk, and unloading it gives a 1.4M smaller image. Doing
the same for Balloon3D gives 1.3M of source and a 0.5M smaller image.

I will post instructions for doing this, along with a couple of fixes I came
across while doing it.

> I just have the feeling that it might not be much harder to draw isolation
> lines around the big chunks than it is around the little ones, and the payoff
> might be higher, in that it might *soon* be possible for mere mortals to
> perform their own versions of majorShrink, and have it really work.

Two points: 

1. My estimates were that unloading modules will leave a much larger image
than I had hoped for. The total source size is now about 17M (see gif);
VMConstruction and Balloon above suggest about a 1/2 ratio or less for image
size, which means 8-9M out of the current 16M. Ie. there are other things in
the image that unloading modules of code probably won't help with.

I've not been able to guess what this is; somewhere between 2.8 and 3.0 IIRC
the image grew much more than the added code can account for, and when I
removed the Welcome projects that just gave slightly over 1M back, clearing
the flaps also gave just about 100k.

One possible cause is that I haven't been able to release everything, thus
giving lower savings than there should be. This would give too low
estimates.

2. VMConstruction and Balloon3D are probably the easiest parts to separate.
However, that didn't mean that making either of them unload properly was
easy, and it still isn't "well" done--this is what made me realize what an
amount of work will be involved in this.

This is about as much as I know.

Henrik

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 5163 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020131/a1015ff6/attachment.gif


More information about the Squeak-dev mailing list