Investigating fullBounds/layoutChanged

Eddie Cottongim cottonsqueak at earthlink.net
Thu Oct 17 22:20:20 UTC 2002


While playing around with fullBounds and layoutChanged, I noticed that both
are invoked once for every mouse move.

(I checked this by placing a Smalltalk beep in Morph>>fullBounds and later
in Morph>>layoutChanged - don't use the Transcript for tracing those, as
there will be an infinite loop.)

I can understand why fullBounds might be required for every mouse move
(deciding what morph an event goes to), but unfortunately, every time, it is
taking the 'long route' of doing the layout, merging submorph bounds, etc
instead of using the cached value in the instance var fullBounds. (this is
verified by putting the beep after the check for fullBounds
ifNotNil:[^fullBounds] - it still beeps once for each mouse move.)

It seems the instance variable fullBounds is always nil at these times.
layoutChanged being sent once/mouse move would explain this, since it sets
fullBounds to nil. I haven't figured out exactly who is sending the
layoutChanged and why. (That selector has a lot of senders..) Someone else
might know this.

Am I getting at anything here? It seems layoutChanged shouldn't be sent at
all for mouse movements. If that could resolved it would avoid a lot of the
fullBounds work. Its not a big speed hit for fast machines, but it still
might be worth cleaning up.

Thanks,
Eddie







More information about the Squeak-dev mailing list