Investigating fullBounds/layoutChanged
Eddie Cottongim
squeak-dev at lists.squeakfoundation.org
Fri Oct 18 21:21:10 UTC 2002
This is a multi-part message in MIME format.
------=_NextPart_000_0038_01C276CA.C056A390
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Andreas said:
> I wasn't asking it it "will" - I was asking if it "does" ;-) E.g., when
> it comes to optimization it's only the numbers that count. Make up a
> case, show some numbers, show the improvement and noone will object.
For these tests I had about 8 collapsed SystemWindows, a trash can, a
workspace, and a browser open. Windows 2000, Squeak 3.2 on a Cyrix
133mhz(uggh) with 80mb ram.
I started a MessageTally from the world menu and twiddled the mouse around
on the background (not on any of the windows that were open).
Here are the results from the standard code:
----------------------------------------------------------------------------
---------
- 1061 tallies, 18173 msec.
**Tree**
99.8% {18137ms} PasteUpMorph>>doOneCycle
99.6% {18100ms} WorldState>>doOneCycleFor:
72.5% {13175ms} WorldState>>doOneCycleNowFor:
|66.9% {12158ms} HandMorph>>processEvents
| |59.4% {10795ms} HandMorph>>handleEvent:
| | |46.0% {8360ms} HandMorph>>sendMouseEvent:
| | | |45.8% {8323ms} HandMorph>>sendEvent:focus:clear:
| | | | 45.8% {8323ms} PasteUpMorph(Morph)>>processEvent:
| | | | 45.7% {8305ms} PasteUpMorph>>processEvent:using:
| | | | 45.6% {8287ms}
PasteUpMorph(Morph)>>processEvent:using:
| | | | 45.3% {8232ms}
MorphicEventDispatcher>>dispatchEvent:with:
| | | | 45.0% {8178ms}
MorphicEventDispatcher>>dispatchDefault:with:
| | | | 33.6% {6106ms} PasteUpMorph(Morph)>>fullBounds
<--------
| | | | |30.5% {5543ms}
PasteUpMorph(Morph)>>doLayoutIn:
| | | | | |10.7% {1945ms} FlapTab>>ownerChanged
| | | | | | |8.0% {1454ms} FlapTab>>fitOnScreen
| | | | | | | |2.5% {454ms} FlapTab>>orientation
| | | | | | | | 2.5% {454ms}
Array(SequenceableCollection)>>includes:
| | | | | | | | 2.3% {418ms}
Array(SequenceableCollection)>>indexOf:
| | | | | | |2.6% {472ms}
FlapTab(Morph)>>ownerChanged
| | | | | |8.4% {1527ms}
PasteUpMorph(Morph)>>privateFullBounds
| | | | | | |5.8% {1054ms}
PasteUpMorph(Morph)>>submorphBounds
| | | | | |5.3% {963ms}
SystemWindow(Morph)>>ownerChanged
| | | | | | |4.7% {854ms}
SystemWindow(Morph)>>snapToEdgeIfAppropriate
| | | | | | | 4.5% {818ms}
SystemWindow(Morph)>>valueOfProperty:
| | | | | | | 4.4% {800ms}
MorphExtension>>valueOfProperty:
| | | | | | | 3.8% {691ms}
MorphExtension>>valueOfProperty:ifAbsent:
| | | | | | | 3.3% {600ms}
IdentityDictionary(Dictionary)>>at:ifAbsent:
| | | | | | | 2.8% {509ms}
IdentityDictionary(Set)>>findElementOrNil:
| | | | | |3.9% {709ms}
Array(SequenceableCollection)>>do:
| | | | |2.4% {436ms}
PasteUpMorph(Morph)>>layoutBounds
| | | | 5.1% {927ms}
SystemWindow(Morph)>>processEvent:using:
| | | | |3.6% {654ms}
MorphicEventDispatcher>>dispatchEvent:with:
| | | | | 2.6% {472ms}
MorphicEventDispatcher>>dispatchDefault:with:
| | | | 3.1% {563ms}
TrashCanMorph(Morph)>>transformedFrom:
| | |11.3% {2054ms} MouseOverHandler>>processMouseOver:
| | | 9.9% {1799ms} HandMorph>>handleEvent:
| | | 9.8% {1781ms} HandMorph>>sendMouseEvent:
| | | 9.8% {1781ms} HandMorph>>sendEvent:focus:clear:
| | | 9.8% {1781ms} PasteUpMorph(Morph)>>processEvent:
| | | 9.8% {1781ms} PasteUpMorph>>processEvent:using:
| | | 9.7% {1763ms}
PasteUpMorph(Morph)>>processEvent:using:
| | | 9.6% {1745ms}
MorphicEventDispatcher>>dispatchEvent:with:
| | | 9.4% {1708ms}
MorphicEventDispatcher>>dispatchDefault:with:
| | | 4.1% {745ms}
SystemWindow(Morph)>>processEvent:using:
| | | |2.6% {472ms}
MorphicEventDispatcher>>dispatchEvent:with:
| | | | 2.2% {400ms}
MorphicEventDispatcher>>dispatchDefault:with:
| | | 2.5% {454ms}
SystemWindow(Morph)>>transformedFrom:
| |5.9% {1072ms} EventSensor>>nextEvent
| | 5.9% {1072ms} EventSensor>>nextEventFromQueue
| | 3.4% {618ms} primitives
| | 2.4% {436ms} SharedQueue>>isEmpty
|3.3% {600ms} WorldState>>displayWorldSafely:
| |2.7% {491ms} PasteUpMorph>>displayWorld
| | 2.7% {491ms} PasteUpMorph>>privateOuterDisplayWorld
| | 2.7% {491ms} WorldState>>displayWorld:submorphs:
|2.1% {382ms} PasteUpMorph>>runStepMethods
| 2.1% {382ms} WorldState>>runStepMethodsIn:
| 2.1% {382ms} WorldState>>runLocalStepMethodsIn:
27.0% {4907ms} WorldState>>interCyclePause:
26.4% {4798ms} Delay>>wait
<--------
26.0% {4725ms} primitives
**Leaves**
26.0% {4725ms} Delay>>wait
7.3% {1327ms} Array(SequenceableCollection)>>do:
4.1% {745ms} IdentityDictionary>>scanFor:
3.7% {672ms} MorphicEventDispatcher>>dispatchDefault:with:
3.4% {618ms} EventSensor>>nextEventFromQueue
2.7% {491ms} SystemWindow(Morph)>>transformedFrom:
2.4% {436ms} SharedQueue>>isEmpty
2.3% {418ms} TrashCanMorph(Morph)>>fullBounds
**Memory**
old +0 bytes
young -39,476 bytes
used -39,476 bytes
free +39,476 bytes
**GCs**
full 0 totalling 0ms (0.0% uptime)
incr 138 totalling 1,168ms (6.0% uptime), avg 8.0ms
tenures 0
root table 0 overflows
----------------------------------------------------------------------------
---------
So we see 33.6% of the time spent in fullBounds and friends, and 26.4% in
Delay.
Next are the results I got using the attached code.
----------------------------------------------------------------------------
---------
- 699 tallies, 11438 msec.
**Tree**
99.9% {11427ms} PasteUpMorph>>doOneCycle
99.9% {11427ms} WorldState>>doOneCycleFor:
59.4% {6794ms} WorldState>>interCyclePause:
|58.9% {6737ms} Delay>>wait <--------
| 58.8% {6726ms} primitives
40.2% {4598ms} WorldState>>doOneCycleNowFor:
31.9% {3649ms} HandMorph>>processEvents
|26.8% {3065ms} HandMorph>>handleEvent:
| |14.2% {1624ms} HandMorph>>sendMouseEvent:
| | |14.2% {1624ms} HandMorph>>sendEvent:focus:clear:
| | | 14.2% {1624ms} PasteUpMorph(Morph)>>processEvent:
| | | 14.2% {1624ms} PasteUpMorph>>processEvent:using:
| | | 14.2% {1624ms} PasteUpMorph(Morph)>>processEvent:using:
| | | 14.2% {1624ms}
MorphicEventDispatcher>>dispatchEvent:with:
| | | 14.2% {1624ms}
MorphicEventDispatcher>>dispatchDefault:with:
| | | 6.7% {766ms} FlapTab(Morph)>>processEvent:using:
| | | |4.4% {503ms}
MorphicEventDispatcher>>dispatchEvent:with:
| | | | 3.4% {389ms}
MorphicEventDispatcher>>dispatchDefault:with:
| | | 2.4% {275ms}
SystemWindow(Morph)>>transformedFrom:
| |12.0% {1373ms} MouseOverHandler>>processMouseOver:
| | 10.7% {1224ms} HandMorph>>handleEvent:
| | 10.7% {1224ms} HandMorph>>sendMouseEvent:
| | 10.7% {1224ms} HandMorph>>sendEvent:focus:clear:
| | 10.7% {1224ms} PasteUpMorph(Morph)>>processEvent:
| | 10.7% {1224ms} PasteUpMorph>>processEvent:using:
| | 10.4% {1190ms}
PasteUpMorph(Morph)>>processEvent:using:
| | 10.3% {1178ms}
MorphicEventDispatcher>>dispatchEvent:with:
| | 10.3% {1178ms}
MorphicEventDispatcher>>dispatchDefault:with:
| | 4.4% {503ms}
SystemWindow(Morph)>>processEvent:using:
| | |2.9% {332ms}
MorphicEventDispatcher>>dispatchEvent:with:
| | | 2.7% {309ms}
MorphicEventDispatcher>>dispatchDefault:with:
| | 2.6% {297ms}
MouseEvent(UserInputEvent)>>transformedBy:
| | 2.1% {240ms}
SystemWindow(Morph)>>transformedFrom:
|4.1% {469ms} EventSensor>>nextEvent
| 4.1% {469ms} EventSensor>>nextEventFromQueue
5.0% {572ms} PasteUpMorph>>runStepMethods
|5.0% {572ms} WorldState>>runStepMethodsIn:
| 5.0% {572ms} WorldState>>runLocalStepMethodsIn:
2.9% {332ms} WorldState>>displayWorldSafely:
2.4% {275ms} PasteUpMorph>>displayWorld
2.4% {275ms} PasteUpMorph>>privateOuterDisplayWorld
2.4% {275ms} WorldState>>displayWorld:submorphs:
**Leaves**
58.8% {6726ms} Delay>>wait
5.3% {606ms} MorphicEventDispatcher>>dispatchDefault:with:
2.1% {240ms} MouseMoveEvent(UserInputEvent)>>transformedBy:
**Memory**
old +0 bytes
young +173,424 bytes
used +173,424 bytes
free -173,424 bytes
**GCs**
full 0 totalling 0ms (0.0% uptime)
incr 37 totalling 200ms (2.0% uptime), avg 5.0ms
tenures 0
root table 0 overflows
---------------------------------------------------------------------------
We now spent 58% of the time in Delay vs 26% before (the difference being
~33%, which is what we were spending on doing fullBounds before), so I think
this means we are giving much more time back to the OS, which it can use to
run other things, sleep, save power, etc.
I realize this isn't the most controlled benchmark - for example, there is
no assurance I twiddled the mouse in the same way. But I think it gives a
general idea.
Eddie
------=_NextPart_000_0038_01C276CA.C056A390
Content-Type: application/octet-stream;
name="HandMorphTweaks-efc.1.cs.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="HandMorphTweaks-efc.1.cs.gz"
H4sIAAAAAAAAAHVTTU/bQBA9+7D/4SUcAhIYhxIElloJaKNSlQ8VblGKNt5xsqrtdXfXCan48Z21
SSracljLOzN+782b8WBsTYn7nw3JH+/iI5gcwxG+yKqRdo2jJDnCpJCenEdTK35JsXN8NjqZwlQY
nuI282ZGtquUHqM0SdLjEepy0BP9y4Ws5oR78mkUfZaVuja2XjysmMwdUJ6JjwExiqK/kMR54xfG
hswnpTTh0nhvqrkuhbitvS71L8IWz8EbVMbDUaVQyLVpfMesQsYvSFuYVUV2l9+xMrZQezHOHXJp
IR1WhExW8FQU+6HcErRjRFiSjvtkEBVwtNsHk0J7rm8cOdCS2KbS8IWfSwqlubEZQb4IQWbKuvHS
a1PF/Z4QoteKRknconJjbhODORm+2/UAzsuy5gi7g2FyODw9bK0dnqSjM7a0Nk4HqBTyzujKi2hj
cmhtkw1jDHJZU6AKmttTFCGjvYNrZm3OxX0homcoKrzEzDzhWUTd5fGFAgccbyoVbK6/Uu5jEe12
JU94jyRAp5h0kXWITPeg8wfb8LJMvvNUinwaA/2bhvmzVm1fRIHrsU0i58RFS/EHWhl/Z41qMp92
4vbwgQ1JNsgTEUV9iufxfmgytM8THCao9RMVrh2GYpaoJdDVUhZafaOAxsTxfxO7QZK3snJh4y/W
G2KunjLtWBau433j05LsnN6GaXH4tF/XVi85O+bOr1nqtirmafSvclxBlrxD2x3nLtf/7DCbRK7d
/EyyBXIW9o3rtmvQmR1m/KLZbQFfNdQCc+TG+BtdpJPu/upPmgbxPfAC/wag1FEnMwQAAA==
------=_NextPart_000_0038_01C276CA.C056A390--
More information about the Squeak-dev
mailing list
|