[FIX] Eliminate some costly calls to #fullBounds in MorphicEventDispatcher

Henrik Gedenryd Henrik.Gedenryd at lucs.lu.se
Wed Sep 5 19:27:12 UTC 2001


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