[squeak-dev] The Inbox: System-edc.512.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Jan 22 15:45:44 UTC 2013


2013/1/22 Bert Freudenberg <bert at freudenbergs.de>:
>
> On 21.01.2013, at 12:44, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
>
>> Ah ah, I wanted to ask if 3 timesRepeat garbageCollect was a kind of
>> magical thinking or a known limitation of our collector :)
>>
>> I noticed several usages of such snippet, in ReleaseBuilder and
>> ScriptLoader and WeakSetInspectorTest, but oh, the last has my
>> initials stamped :(
>>
>> I also wonder what are the effects of flushing the caches...
>>
>> As I understand it, MCFileBasedRepository flushAllCaches will ignore
>> the copy already in package-cache and force a re-load from network. It
>> is already present above in code, so let's consider the effect is
>> benign.
>> (Personnaly I would only trigger a reload action in exception
>> handling, because if network is unreliable, there is a high risk to
>> replace a finally valid load by an invalid one).
>>
>> I have no idea of what (MCDefinition clearInstances) does, all I see
>> is that 'instances' variable is weak, so I presume it is supposed to
>> auto-clean. While chasing the pointers of MCDefinition
>> allSubInstances, I noticed a lot of MC related scories in Object's
>> DependentFields.
>> So we can consider this cache flushing as a workaround, but should
>> better chase the buggish dependents...
>>
>> Nicolas
>
> Oh, I didn't even notice the clearInstances. That's definitely not needed as they are weak, as you say.
>
> - Bert -
>

Even worse:

As I understand it, the purpose of MCDefinition cache is to avoid
having multiple copies of same MCDefinition lying around the image.
So clearing the cache could at worse increase image size by creating
another copy of the same MCDefinition next time one is created.

Unfortunately there is also this problem of MCTool ghosts haunting
Object's DependentFields which let us believe that it's a good idea to
clear the cache...

>>
>> 2013/1/21 Bert Freudenberg <bert at freudenbergs.de>:
>>> On 21.01.2013, at 14:05, commits at source.squeak.org wrote:
>>>
>>>> 3 timesRepeat: [ Smalltalk garbageCollect].
>>>
>>> Doing this 3 times is superstitious. It won't clean up more than doing it once.
>>>
>>> IMHO an explicit GC is not necessary at all - what purpose does it serve?
>>>
>>> - Bert -
>>>
>>>
>>
>
>


More information about the Squeak-dev mailing list