Morphic event refactoring

Lex Spoon lex at cc.gatech.edu
Mon Oct 16 22:58:51 UTC 2000


Even better, query the World variable, and update it whenever you are
traversing down through the morphic hierarchy.  Obvious places that this
kind of traversal happens are:

	1. in startSteppingBlahBlohOf: .
	2. when finding the morph to send an event to.
	3. when traversing via drawOn:

Basically, it would be nice if morphic code always used submorphsDo:
instead of submorphs do:, in which case submorphsDo: could be modified
to update World as necessary.  Something would need to be done to handle
errors, as well.

Overall, this approach works as long as you are running in the main
Morphic thread.  If you are running in a separate thread, then you need
to be more specific about which world you are asking for, anyway.


-Lex




Ned Konz <ned at bike-nomad.com> wrote:
> With regards to the Morphic event improvement now going on at SqC,
> just one observation:
> 
> >From a message tally, it's apparent that a lot of the work being
> done in Morphic is just finding the world under the cursor.
> 
> For instance, in a typical session, Morphic spent 14% of its time
> looking for worlds in PluggableTextMorphs.
> 
> An obvious optimization here would be to maintain a global collection
> of worlds that could be queried, instead of traversing the entire
> collection of Morphs depth-first.
> 
> This could help power consumption considerably in PDA versions,
> along with getting the event VM to work right.
> 
> -- 
> Ned Konz
> currently: Stanwood, WA
> email:     ned at bike-nomad.com
> homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list