How to reduce the Squeak.image size

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to reduce the Squeak.image size

L'Valente
I've enhanced my own squeak.image (squeakland 3.9 version) but it is now too big (about 30Mb). I think it should have a way to decrease the file size, because all the items I added did not reach 2 Mb.
Any help?
Thanks in advance
Luis
Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] How to reduce the Squeak.image size

Ramon Leon-5
> I've enhanced my own squeak.image (squeakland 3.9 version)
> but it is now too
> big (about 30Mb). I think it should have a way to decrease
> the file size,
> because all the items I added did not reach 2 Mb.
> Any help?
> Thanks in advance
> Luis

http://onsmalltalk.com/programming/smalltalk/squeak-smalltalk-image-maintena
nce/

Ramon Leon
http://onsmalltalk.com


Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: How to reduce the Squeak.image size

Bernd Elkemann
In reply to this post by L'Valente
valente schrieb:
> I've enhanced my own squeak.image (squeakland 3.9 version) but it is now too
> big (about 30Mb). I think it should have a way to decrease the file size,
> because all the items I added did not reach 2 Mb.
> Any help?
> Thanks in advance
> Luis

Hi

(the previous answer helps if the problem is obsolete-classes. Do-It the
following to find out if you have some:
SystemNavigation default obsoleteClasses inspect
)

But my guess is that you are referencing no-longer-needed objects in one
of your workspaces. e.g. if you do-it the following in a workspace:
a:='text'.
1000000 timesRepeat: [a:=a,a].
your memory will run low and you have to abort, when you save the image
it will be hundreds of MB big.
Then if you reopen the image and close the workspace the reference to
the text-object a will be forgotten (and the garbage collector does its
job), if you save the image it will have some 15 MB.
Check what references in Workspaces are needed and free the rest (a:=nil).
If you want to get rid of all the references copy what you need from the
workspace to another, then close it.
I start with new workspaces all the time, if i need to keep something i
write " Smalltalk at: #important put: 'the object to keep' ".

If you have done the above you should be at the typical ~15 MB size, if
you want to get smaller: there has been some work at scripts deleting
functionality from squeak ("Smalltalk majorShrink"), i guess there are
also scripts that dump 3D/balloon,voiceSynthesis but keep morphic.
Important: make backup copy. There are squeak images as small as 500kb.

Greetings