Morphic slowness (was Re: Does *anyone* use MVC?)

Bruce Cohen brucecohen at qwest.net
Fri Aug 2 03:43:28 UTC 2002


Tim,

I tried this in my normal work image (3.2 gamma with all current 
updates, OS X VM 3.2.6Beta8) and got the attached results.  It's been 
awhile since I tried to interpret a profile like this, but it looks 
reasonable to me.  As far as I can see, a little less than half the 
time is being spent drawing the menu buttons and so on, and I think 
some of the rest is going to redraw surrounding parts of the browser 
and world background because the damage area may be specified larger 
than it really is (that last is a guess, though).   Do you get 
anything seriously different?

Bruce

At 11:35 PM +0200 8/1/02, Andreas Raab wrote:
>Tim,
>
>>  > What performance problems are you seeing?
>>  General tardiness in a non-descript way.
>[...]
>>  I suppose we really need some good meaningful test scenarios
>>  that can be automated and profiled to really try to sort this out.
>
>Well, then let's get started. You say that opening menus hurts?! So how
>about (from a workspace):
>
>selectItems := false. "if true, select all the menu items"
>Browser fullOnClass: Morph selector: #aboutToBeGrabbedBy:.
>World doOneCycleNow.
>MessageTally spyOn:[
>	World firstSubmorph "the app" allMorphsDo:[:m|
>		(m isKindOf: ScrollPane) ifTrue:[
>			1 to: 10 do:[:i|
>			(m getMenu: false) ifNotNilDo:[:menu|
>				menu popUpAt: m position forHand: m
>activeHand in: m world.
>				World doOneCycleNow.
>
>selectItems ifTrue:[
>				menu submorphs do:[:item|
>					(item isKindOf: MenuItemMorph)
>ifTrue:[
>						menu selectItem: item
>event: m activeHand lastEvent.
>						World doOneCycleNow.
>					].
>				].
>].
>				menu delete.
>				World doOneCycleNow.
>			].
>			].
>		].
>	].
>].
>
>That should give you a pretty decent hint about what is going on ;-)
>
>Cheers,
>   - Andreas


-- 
"The joke is over when the head falls off." - Scotts' proverb
=========
Bruce Cohen
5908 SW California St.
Portland, OR 97219
brucecohen at qwest.net
-------------- next part --------------
  - 869 tallies, 16222 msec.

**Tree**
82.7% {13416ms} PasteUpMorph>>doOneCycleNow
   |82.7% {13416ms} WorldState>>doOneCycleNowFor:
   |  81.2% {13172ms} WorldState>>displayWorldSafely:
   |    81.2% {13172ms} PasteUpMorph>>displayWorld
   |      81.2% {13172ms} PasteUpMorph>>privateOuterDisplayWorld
   |        81.2% {13172ms} WorldState>>displayWorld:submorphs:
   |          71.6% {11615ms} WorldState>>drawWorld:submorphs:invalidAreasOn:
   |            |69.7% {11307ms} FormCanvas(Canvas)>>fullDrawMorph:
   |            |  69.6% {11291ms} FormCanvas(Canvas)>>fullDraw:
   |            |    69.6% {11291ms} SystemWindow(Morph)>>fullDrawOn:
   |            |      57.8% {9376ms} SystemWindow(Morph)>>drawSubmorphsOn:
   |            |        |57.8% {9376ms} FormCanvas(Canvas)>>fullDrawMorph:
   |            |        |  57.7% {9360ms} FormCanvas(Canvas)>>fullDraw:
   |            |        |    57.5% {9328ms} AlignmentMorph(Morph)>>fullDrawOn:
   |            |        |      43.5% {7057ms} 
AlignmentMorph(Morph)>>drawSubmorphsOn:
   |            |        |        |43.4% {7040ms} 
FormCanvas(Canvas)>>fullDrawMorph:
   |            |        |        |  43.4% {7040ms} 
FormCanvas(Canvas)>>fullDraw:
[43.4% {7040ms} AlignmentMorph(Morph)>>fullDrawOn:
[  25.9% {4201ms} AlignmentMorph(Morph)>>drawSubmorphsOn:
[    |25.3% {4104ms} FormCanvas(Canvas)>>fullDrawMorph:
[    |  25.3% {4104ms} FormCanvas(Canvas)>>fullDraw:
[    |    25.3% {4104ms} PluggableButtonMorph(Morph)>>fullDrawOn:
[    |      7.4% {1200ms} FormCanvas(Canvas)>>roundCornersOf:during:
[    |        |7.4% {1200ms} FormCanvas>>roundCornersOf:in:during:
[    |        |  7.2% {1168ms} CornerRounder 
class>>roundCornersOf:on:i...orderWidth:corners:
[    |        |    5.6% {908ms} 
CornerRounder>>tweakCornersOf:on:in:borderWidth:corners:
[    |      6.0% {973ms} PluggableButtonMorph(Morph)>>drawSubmorphsOn:
[    |        |5.6% {908ms} FormCanvas(Canvas)>>fullDrawMorph:
[    |        |  5.4% {876ms} FormCanvas(Canvas)>>fullDraw:
[    |        |    5.4% {876ms} AlignmentMorph(Morph)>>fullDrawOn:
[    |        |      3.5% {568ms} FormCanvas(Canvas)>>drawMorph:
[    |        |        3.5% {568ms} FormCanvas(Canvas)>>draw:
[    |        |          3.1% {503ms} RectangleMorph(Morph)>>drawOn:
[    |        |            2.9% {470ms} 
FormCanvas(Canvas)>>fillRectangle:fillStyle:borderStyle:
[    |      5.5% {892ms} FormCanvas(Canvas)>>drawMorph:
[    |        |5.4% {876ms} FormCanvas(Canvas)>>draw:
[    |        |  3.0% {487ms} RectangleMorph(Morph)>>drawOn:
[    |        |    |2.6% {422ms} 
FormCanvas(Canvas)>>fillRectangle:fillStyle:borderStyle:
[    |        |  2.2% {357ms} PluggableButtonMorph>>drawOn:
[    |        |    2.2% {357ms} PluggableButtonMorph(Morph)>>drawOn:
[    |      3.7% {600ms} TransformMorph>>drawSubmorphsOn:
[    |        3.3% {535ms} FormCanvas(Canvas)>>fullDrawMorph:
[    |          3.3% {535ms} FormCanvas(Canvas)>>fullDraw:
[    |            3.2% {519ms} TextMorphForEditView(Morph)>>fullDrawOn:
[    |              2.9% {470ms} FormCanvas(Canvas)>>drawMorph:
[    |                2.9% {470ms} FormCanvas(Canvas)>>draw:
[    |                  2.9% {470ms} TextMorphForEditView(TextMorph)>>drawOn:
[    |                    2.4% {389ms} FormCanvas>>paragraph:bounds:color:
[    |                      2.2% {357ms} NewParagraph>>displayOn:using:at:
[  6.3% {1022ms} TransformMorph>>drawSubmorphsOn:
[    |5.2% {844ms} FormCanvas(Canvas)>>fullDrawMorph:
[    |  4.9% {795ms} FormCanvas(Canvas)>>fullDraw:
[    |    4.7% {762ms} StringMorph(Morph)>>fullDrawOn:
[  5.2% {844ms} FormCanvas(Canvas)>>drawMorph:
[    |5.1% {827ms} FormCanvas(Canvas)>>draw:
[    |  3.7% {600ms} BorderedSubpaneDividerMorph(Morph)>>drawOn:
[    |    3.6% {584ms} FormCanvas(Canvas)>>fillRectangle:fillStyle:borderStyle:
[  3.2% {519ms} FormCanvas(Canvas)>>roundCornersOf:during:
[    3.2% {519ms} FormCanvas>>roundCornersOf:in:during:
[      2.9% {470ms} CornerRounder 
class>>roundCornersOf:on:i...orderWidth:corners:
   |            |        |      9.1% {1476ms} FormCanvas(Canvas)>>drawMorph:
   |            |        |        9.0% {1460ms} FormCanvas(Canvas)>>draw:
   |            |        |          3.5% {568ms} PluggableListMorph>>drawOn:
[2.4% {389ms} PluggableListMorph(Morph)>>drawOn:
[  2.3% {373ms} FormCanvas(Canvas)>>fillRectangle:fillStyle:borderStyle:
[    2.2% {357ms} InsetBorder(SimpleBorder)>>frameRectangle:on:
   |            |        |          2.2% {357ms} MenuItemMorph>>drawOn:
[2.1% {341ms} MenuItemMorph(StringMorph)>>drawOn:
[  2.1% {341ms} FormCanvas(Canvas)>>drawString:in:font:color:
[    2.1% {341ms} FormCanvas>>drawString:from:to:in:font:color:
   |            |      6.3% {1022ms} FormCanvas(Canvas)>>roundCornersOf:during:
   |            |        |6.3% {1022ms} FormCanvas>>roundCornersOf:in:during:
   |            |        |  6.0% {973ms} CornerRounder 
class>>roundCornersOf:on:i...orderWidth:corners:
   |            |        |    4.6% {746ms} 
CornerRounder>>tweakCornersOf:on:in:borderWidth:corners:
   |            |      5.1% {827ms} FormCanvas(Canvas)>>drawMorph:
   |            |        5.1% {827ms} FormCanvas(Canvas)>>draw:
   |            |          3.7% {600ms} SystemWindow(Morph)>>drawOn:
   |            |            3.5% {568ms} 
FormCanvas(Canvas)>>fillRectangle:fillStyle:borderStyle:
   |            |              2.2% {357ms} 
RaisedBorder(SimpleBorder)>>frameRectangle:on:
   |          8.4% {1363ms} WorldState>>forceDamageToScreen:
   |            8.4% {1363ms} DisplayScreen>>forceDamageToScreen:
   |              7.9% {1282ms} DisplayScreen>>forceToScreen:
12.2% {1979ms} MenuMorph>>popUpAt:forHand:in:
   |12.2% {1979ms} MenuMorph>>popUpAt:forHand:in:allowKeyboard:
   |  10.9% {1768ms} PasteUpMorph>>addMorphFront:
   |    10.9% {1768ms} PasteUpMorph(Morph)>>addMorphInFrontOfLayer:
   |      10.9% {1768ms} PasteUpMorph(Morph)>>addMorph:inFrontOf:
   |        10.9% {1768ms} PasteUpMorph(Morph)>>privateAddMorph:atIndex:
   |          10.8% {1752ms} PasteUpMorph(Morph)>>addedOrRemovedSubmorph:
   |            10.8% {1752ms} MenuMorph(Morph)>>fullBounds
   |              10.8% {1752ms} MenuMorph(Morph)>>doLayoutIn:
   |                9.8% {1590ms} TableLayout>>layout:in:
   |                  9.8% {1590ms} TableLayout>>layoutTopToBottom:in:
   |                    6.8% {1103ms} MenuLineMorph(Morph)>>layoutInBounds:
   |                      |3.8% {616ms} MenuItemMorph(Morph)>>bounds:
   |                      |  2.2% {357ms} MenuItemMorph(Morph)>>extent:
   |                      |    2.1% {341ms} MenuItemMorph(Morph)>>changed
   |                    2.3% {373ms} MenuItemMorph(Morph)>>minExtent
3.8% {616ms} PluggableListMorph>>getMenu:
   3.7% {600ms} PluggableListMorph(ScrollPane)>>getMenu:

**Leaves**
7.9% {1282ms} DisplayScreen>>forceToScreen:
3.6% {584ms} Point>>+
2.9% {470ms} DisplayScreen(Form)>>depth
2.8% {454ms} Rectangle class>>origin:corner:
2.8% {454ms} Rectangle>>setOrigin:corner:
2.8% {454ms} Rectangle>>left
2.5% {406ms} Rectangle>>right
2.5% {406ms} IdentityDictionary>>scanFor:
2.4% {389ms} Rectangle>>bottom
2.3% {373ms} SmallInteger class(Behavior)>>inheritsFrom:
2.1% {341ms} MorphExtension>>valueOfProperty:ifAbsent:

**Memory**
	old			+188,252 bytes
	young		-55,492 bytes
	used		+132,760 bytes
	free		-132,760 bytes

**GCs**
	full			0 totalling 0ms (0.0% uptime)
	incr		475 totalling 1,499ms (9.0% uptime), avg 3.0ms
	tenures		4 (avg 118 GCs/tenure)
	root table	0 overflows


More information about the Squeak-dev mailing list