[squeak-dev] Re: How weak finalization affects the performance
asqueaker at gmail.com
Thu Nov 4 19:58:05 UTC 2010
>> Here, at each GC cycle, a 'dict finalizeValues' will be sent,
>> which leads to looping over 1000 entries.
>> Add dict with 10000 entries, and you will loop over 10000 after each GC.
> You should never register WeakKeyDictionaries to the finalization process.
> They are not thread safe.
> Since the next VMs will support your new finalization scheme, I see no
> benefit from the delay.
Igor, I know I'm very late to this discussion but.. The other benefit
to the Delay that your finalization scheme does not solve is the fact
that there could be a lot of _registrants_ in WeakArray that need to
be enumerated after every GC.
Correct me if I'm wrong, but your finalization fix only allows each
individual registrant to "clean quickly" rather than do a full
enumeration; is that right?
If there are 5000 registrants in WeakArray, the delay would prevent
enumerating 5000 elements after every GC unless 5 seconds have
elapsed. So we are we not best off with _both_ your finalization fix
_and_ the delay...?
More information about the Squeak-dev