[modules] Reducing the image size by 38% and 50%
Hannes Hirzel
hirzel at spw.unizh.ch
Wed Jan 30 23:05:03 UTC 2002
Hi
Henrik Gedenryd answered to my question 20 days ago:
>There will be a grat deal of refactoring required before the module
system
>will work to shrink the image efficiently. Even with the module system,
all
>the horrible dependencies are still there and need to be removed.
>So it will be a while before the old-style shrinking procedure will be
>superseded.
and yesterday he wrote
>But what I really wonder is what made the image grow to 15+ megs from 9
or
>so, it's nowhere near all code, I thought it was the "Welcome" projects
but
>that's just roughly a meg. It's really terrible that shrinking the image
is
>the blackest of Squeak arts.
I did a test today how to reduce the image size of a Squeak3.3a-4664.image
which is 16446kB.
I did the following steps
Select 'flaps...' and then 'destroy shard flaps'.
Manually delete the sample projects.
Execute
Smalltalk zapAllOtherProjects
This reduced the image size to 15326KB.
Executing
ChangeSet allInstancesDo: [:cs | cs zapHistory].
Smalltalk garbageCollect
and saving the image showed that a new image size of 11839kB
Deleting all the ChangeSets
ChangeSorter removeChangeSetsNamedSuchThat:
[:aName | (aName = 'New Changes') not]
gave a new image size of 10170kB which is a total reduction of 38%.
So the major part comes from the change sets not the example projects.
I did a similar test some last week with a 4599 image and documented it on
http://minnow.cc.gatech.edu/squeak/2182 (Smalltalk majorShrink)
It gave a 50% reduction and I still had a running system which was fairly
complete
(for my needs).
The page http://minnow.cc.gatech.edu/squeak/2182 contains copies from
emails I collected
from this list.
Another test (not documented there) gave a resulting image (with
Morphic) with just 4.5 MB which was fine.
The basic conclusion is that you have to do your own version of "Smalltalk
majorShrink".
I hope this information helps.
Hannes Hirzel
P.S. Thank you, Henrik, for your work on modules! It's nice that it's now
in the
update stream.
More information about the Squeak-dev
mailing list
|