optimizing morphs

Ross Boylan RossBoylan at stanfordalumni.org
Mon Jan 27 17:18:15 UTC 2003


I just noticed that I can consume about all my CPU just by hovering
the mouse over an empty area of a spreadsheet-like widget I've made.
Does anyone have any advice about how to improve this situation other
than "don't do that"? :)

The significant points, I think, are that I have a TwoWayScrollPane
with MyGrid morph inside it.  MyGrid in turn contains 1234 morphs.
I should mention it's not perfectly regular, but it does have rows.

When I time the activity, a lot is going into
MorphicEventDispatcher>>dispatchDefault:with:.  Under that a
significant amount of time goes into some transformation methods; I
think that's because I'm in a ScrollPane.

When I hover over one of the 1234 morphs, I don't use much CPU; it's
just when I'm outside this happens.

It seems the problem is both that there are a lot of morphs on the
list, and that the result of the first search is not cached, so it
keeps looking.

One route would be to make RowMorphs; this would reduce the search
list by a factor of 10.



More information about the Squeak-dev mailing list