Investigating fullBounds/layoutChanged

Andreas Raab Andreas.Raab at gmx.de
Fri Oct 18 11:06:09 UTC 2002


Eddie,

> I see what you are saying, but it seems like the hand is a 
> special case. For most morphs, it is important to send the
> owner layoutChanged so that the owner can redo its own layout
> to accomodate the child's change. But there is no reason I 
> can find that the World would want to redo its layout
> because of a mouse move event. The Hand may be technically a
> child of the World, but its position changing should not cause
> layout invalidations in the way that any other child's
> movements would. Of course, sometimes you want to know
> about mouse moves, and you use the regular event handling
> for that.
> 
> Maybe its worth overriding position: in HandMorph not to
> send owner layoutChanged. Mouse move events come in at a
> pretty high rate and chew up a considerable amount of time,
> especially on a slow system, so optimizing this special case
> could help. I'm trying it right now(attached), and so far there
> are no ill effects.

But does it improve anything?! If not, the added complexity is hardly
worth it - you are making a very special case here and if there's ever a
time where the hand _should_ be sending #layoutChanged you may have a
hard time finding the place. So unless you can show that it improves
something I have reservations to make this optimisation.

Cheers,
  - Andreas




More information about the Squeak-dev mailing list