Dan at SqueakLand.org
Sun Aug 26 18:48:04 UTC 2001
Jon Hylands <jon at huv.com> wrote...
>So, I've been working on building a headless stripper that runs in headless
>mode on a majorShrunk image, and strips out all the classes relating to
>MVC, graphics, tools, etc.
>It works pretty well, except for the fact that the image it saves is
>actually larger than what it started with. I assume there must be a large
>number of objects left lying around, but its kind of hard to look in the
>image given that there are no tools left. What I do now is, after
>stripping, I generate a test report file that dumps the contents of
>Smalltalk. All the classes are gone from there, I've cleaned out
>Undeclared, and removed all non-essential globals.
>I'm going to spend some more time looking, but I'd appreciate it if anyone
>has any ideas of where to look can give me some pointers...
Hi, Jon -
I believe there is a page on the swiki about this, so I would check there.
I usually keep enough code around at first so I can run printSpaceAnalysis, as this frequently offers some useful clues.
Make sure you only have one project at most. It used to be possible to eliminate all projects as well as the class, but I don't know if it still is.
Also see what you get from Smalltalk obsoleteClasses. These can be held onto by method literals or various cached structures. You have to trace backward from an inspector using 'references to his object'. Check for ChangeSets, Undo records, etc. Also note that there may be some Processes around holding onto all sorts of stuff from their stacks. Take a look at the Process browser before you get rid of it ;-). You'll want to figure out how to zap any processes that don't get recreated at startup time.
I know I got down to 240k the last time I tried (8/97), so there is hope.
Hope this helps
More information about the Squeak-dev