[BUG] Whisker clogs up DependentsFields; Object flushDependents
brutally slow
Scott A Crosby
crosby at qwes.math.cmu.edu
Sun Jun 2 18:05:43 UTC 2002
On Wed, 15 May 2002, Bob Arning wrote:
> On Wed, 15 May 2002 16:47:00 -0400 Brian Keefer <mgomes21 at cox.net> wrote:
> >By brutally slow, I mean flushDependents takes over a minute. My image
> >gradually came to this level of sloth, I only noticed the growing delay in
> >save&|quit(which do explicit GC with flushDependents). DependentsFields
> >contains 4600 instances of
> >ClassInHierarchyWrapper, which I guess is eating most of my cycles.
> >According to Object's comment, heavy users of dependents should inherit
> >from Model, and carry their own deps list. Would reparenting
> >ListItemWrapper to Modal be the right fix?
>
> counted up what was in your jpeg and tried again with 7532 items in
> DependentsFields. This time it took 61 seconds! Looks like you have
> crossed a threshhold where the 12-bit identity hash values stop being
> reasonably efficient and result in lots of re-probing.
>
They don't have to be that way... My IdentityHash changeset (early
february) reduces this problem by about 500x.... Right now, for
Dictionaries >4000 elements, that do *not* define a custom hash functions,
we're no faster than a full linear scan.
Another temporary *HACK*, roughly equivalent in effect to that changeset
is to add:
YourClass>>hash
self identityHash * 2000
to whatever the dependent class is.
Sorry for not keeping up with everything going on here.
Scott
More information about the Squeak-dev
mailing list
|