[ENH] Speedup for Morphic World menu

Doug Way dway at mat.net
Wed Mar 22 23:26:34 UTC 2000


This changeset speeds up the display of the World pop-up menu in Morphic
by a factor of 2, roughly.

I had noticed that the World menu in Morphic seemed to open quite a bit
more slowly than the other pop-up menus.  On a 180MHz SGI O2 (which isn't
really *that* slow a machine), it took about 0.5 seconds for the menu to
appear after a mouse click, which was annoying.

A quick look with the ol' "start/browse message tally" showed that a bunch
of time was being spent looking up the current world's project, which is
very slow (uses allInstances).  So I moved this lookup out of the menu
building code and into the menu command.

The changeset is at:

http://www.mindspring.com/~dway/smalltalk/FasterWorldMenu-dew.cs

Hmm, I just noticed that Lex posted on this exact problem...

On Wed, 22 Mar 2000, Lex Spoon wrote:
> I'll leave fixing this better to other minds.  It's not clear that
> this is actually worth optimizing, since it's in the middle of
> exploratory development.

I think it probably doesn't hurt in this case, since moving the project
lookup out of the menu building code seems like the "right" thing to do,
anyway.  The World menu is the most-used pop-up in Morphic, too.

- Doug Way
  EAI/Transom Technologies, Ann Arbor, MI
  http://www.transom.com
  dway at mat.net, @eai.com





More information about the Squeak-dev mailing list