[FIX] Eliminate some costly calls to #fullBounds inMorphicEventDispatcher

Steve Swerling sps2000 at mail.com
Thu Sep 6 04:08:50 UTC 2001


You're right. I somehow got my system in a condition where fullBounds on
the world PasteUpMorph was *always* nil (at least for most mouse moves).
However, I can no longer reproduce this. It may have been one of those
things. "Fix" withdrawn.

Thanks.

Henrik Gedenryd wrote:
> 
> sps2000 at mail.com wrote:
> 
> > Hi,
> >
> > The MorphicEventDispatcher>>dispatchDefault:with: method calls
> > #fullBounds on the incoming aMorph. #fullBounds is a bit costly, and
> > #dispatchDefault... gets called very often by the event loop. This
> > changset prevents unnecessary calls to #fullBounds -- when aMorph is the
> > current world, anEvent position can be assumed to be within aMorph's
> > fullBounds without calling fullbounds.
> 
> This might be a redundant nit, but the code is somewhat clever and the full
> computation is only done when fullBounds is nil. For e.g. the world, this
> should only happen once. And if the computation is not done for a certain
> morph right then, it will be done once later when requested, so the expense
> is not strictly wasted.
> 
> Again sorry if this remark is superfluous.
> 
> Henrik





More information about the Squeak-dev mailing list