« Return to Thread: Size of the image

Re: Size of the image

by brad fowlow :: Rate this Message:

Reply to Author | View in Thread


A few other snippets that are useful...

Some of these may not apply, depending on the exact vintage of your  
Croquet:

        TIslandController initialize.
        TIslandController allInstancesDo: [ :i | i destroy ].
        TContactPoint allInstancesDo: [ :i | i destroy ].
        TFarRef initialize.
        TFormManager default: nil.
        TSessionDispatcher reset.

Debug windows can occasionally get stuck hidden inside
the morphic worlds behind embedded applications,
and they hang on to whole croquet sessions in memory...

        PreDebugWindow allInstancesDo: [ :w|w closeButtonHit].
       

These are often helpful - monticello is greedy...

        MCFileBasedRepository flushAllCaches.
        MCDefinition clearInstances.


And this occasionally can recover a lot of space...
but note that it obliterates all but the active change set.
(If you use MC a lot, change sets can pile up.)

        ChangeSet allInstances do:[:cs|
                cs == ChangeSet current
                        ifFalse:[ChangeSet removeChangeSet: cs]].

I do all of these, and all of Liz's suggestions,
in a single Morphic script that I have hooked to a button on my desktop.

- brad



> Dear Jérôme,
>
> I have the same problem with my Croquet images.  I believe the  
> problem is discussed in the following thread:
>
> https://lists.duke.edu/sympa/arc/croquet-dev/2006-10/msg00014.html
>
> The silly solution that we use is to click on the morphic desktop  
> with the yellow mouse button (option+click on the Mac) and add a  
> few menu items to the menu:
>
>    aMenu add: 'Clear TestingScriptRegistry' target:  
> TestingScriptRegistry action: #removeUnreferencedKeys.
>    aMenu  addLine.
>    aMenu add: 'Empty Trash Can' translated target: Utilities  
> action: #emptyScrapsBook.
>    aMenu add: 'Clear Command History' target: CommandHistory  
> action: #resetAllHistory.
>    aMenu add: 'Collect Garbage' target: Smalltalk action:  
> #garbageCollect.    aMenu addLine.
>
> I then run these before I save my image to clean up any hanging  
> references which will bloat my image.
>
> Hope this helps,
> Liz Wendland
> University of MN
>
> Jérôme Fuselier wrote:
>> Hi,
>>  Starting playing with Croquet, I've created a new version of the  
>> actual official image to play a bit and its size has grown very  
>> quickly (about 2 or 3 times bigger). I don't really understand  
>> why, I've just created some new classes to define my own islands  
>> and I believe that the objects created are well destroyed. Is  
>> there a way to discover what takes so much memory in the image ?  
>> (dead objects, ...)
>>
>>
>> Thanks,
>> Jérôme
>

 « Return to Thread: Size of the image