[squeak-dev] Shrinking

Colin Putney colin at wiresong.com
Tue Jan 7 19:38:56 UTC 2014


On Tue, Jan 7, 2014 at 2:28 PM, Frank Shearar <frank.shearar at gmail.com>wrote:


>  I notice for starters that you #zapMVCProjects _after_ unloading ST80.
> Did you move that specifically, or was that just happenstance from
> folding #unloadReloadablePackages into the shrink script?
>

No, I think the zapping happens while ST80 is still there. I moved the list
of packages to unload to the top, but left the actual unloading in place.


> Regarding this guy:
>
>   names do: [:pkgName | (PackageInfo named: pkgName) classes do: [:ea
> | ea unload]].
>   names do: [:pkgName | Installer mc unload: pkgName].
>
> That's pretty much what I was thinking of doing inside MC's
> #basicLoad. I hesitated because it involves sending #unload twice to
> every class, and doubted whether general implementations of #unload
> were idempotent.
>
> But I guess it must have worked out OK for you during the script?
>

It seems to. But I thought the problem was that #unload has no effect,
because the method has been removed by the time message is sent, and we
fall back to the superclass noop. I originally had one loop the first sent
#unload to all classes, than unloaded the package, but I found that was
more sensitive to the order of the package names. The unload method would
fail because it depended on something that's already gone. Two loops seems
more robust.

I'm still working on it—down to about 10MB now. Will post again when I
declare victory.

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140107/868f4da7/attachment-0001.htm


More information about the Squeak-dev mailing list