On Tue, Jan 7, 2014 at 11:40 AM, Chris Muller <asqueaker@gmail.com> wrote:
Don't forget there is no requirement to shrink an image along package
boundaries.  Did you try, for example, removing TestCase and all
subclasses?  That would cut across package boundaries but so what?

I left TestCase in place, but I did try removing all subclasses. That led to an emergency evaluator. :-)

It turns out I was mistaken. "Smalltalk unloadReloadablePackages" wasn't actually working, it bailed after the first few packages because it calls #fixObsoleteReferences after unloading a package, which raises an error if there are obsolete classes.

Now that I've got that sorted out, I can reliably shrink to a 11.3MB image using the attached script. 

There's one oddity in that script. I had to patch SystemNavigation>>allObjectsDo:, because I was getting a #shouldNotImplement error from the SmallInteger implementation of #nextObject. Somehow, scanning the heap got to the end without encountering the sentinel object created at the top of #allObjectsDo:, and #nextObject answered 0. I'm not sure what to make of that.

Anyway, the script suggests a few fixes that should go into trunk before release. 

Colin